INSERT with entmake

Discussion in 'AutoCAD' started by Sa Mite Samite, Sep 15, 2003.

  1. When I use entmake for a block with attributes AutoCAD expects attributes to
    follow & I don't know how to make them with entnext/entlast/entget etc
    functions. Unlike the concept of getting attributes from an inserted block
    with entnext/entlast/entget & "SEQEND" pointer to reach the end of the block
    instance, entmake seams to me needs some other functions to enter the next
    objects to the insert object. I would like to workout the entmake mechanism
    in apposite to command "function". Is there any idea?



    Samite`
     
    Sa Mite Samite, Sep 15, 2003
    #1
  2. Sa Mite Samite

    Tom Berger Guest

    It's absolutely simple. You just need to entmake the block reference
    (INSERT) with the "attributes will follow" flag (DXF group 70 IIRC).
    And then you just entmake the attributes (ATTRIBs) you want to have.
    There is no need to have ATTDEF entities inside the block definition.

    Tom Berger
     
    Tom Berger, Sep 15, 2003
    #2
  3. Sa Mite Samite

    Mark Propst Guest

    First you have to entmake the block definition
    (entmake
    (list
    '(0 . "BLOCK")
    (cons 2 Inputblkname)
    '(70 . 2)
    (cons 8 InputLyr)
    (cons 10 InputBlkpt )
    );END LIST
    );end entmake

    then entmake each item in block including ATTDEFS

    then the endblock
    (ENTMAKE '((0 . "ENDBLK")))


    Then you entmake the blockreference insertion

    then you entmake all ATTRIBS and other block elements

    then the seqend

    (entmake
    (list
    '(0 . "SEQEND")
    '(8 . "0")
    );end list
    );end entmake
     
    Mark Propst, Sep 16, 2003
    #3
  4. Sa Mite Samite

    Tom Berger Guest

    You don't need a block definition with ATTDEFs to be able to entmake
    an INSERT with ATTRIBs.

    Tom Berger
     
    Tom Berger, Sep 16, 2003
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.