entmake insert

Discussion in 'AutoCAD' started by mark, Sep 17, 2004.

  1. mark

    mark Guest

    hi

    to entmake a complex entity, the help
    provides sample code for a polyline,

    anybody know how to entmake an
    insert entity with attributes, the
    following does not seem to work

    (entmake (list (cons 0 "INSERT") (cons 2 "ExistingBlockw/7Atts")(cons 10
    (list 0 0 0)) (cons 66 1)))
    (repeat 7 (entmake (list (cons 0 "ATTRIB"))))
    (entmake (list (cons 0 "SEQEND")))

    thanks
     
    mark, Sep 17, 2004
    #1
  2. Have you tried including additional DXF codes
    for the attrib and seqend other than zero ?
     
    Jason Piercey, Sep 17, 2004
    #2
  3. mark

    mark Guest

    i tried dxfs 8 1 410 10

     
    mark, Sep 17, 2004
    #3
  4. If you are trying to get by with the bare minimum
    DXF codes for entmaking, I would suggest using
    (entget) on the entity you want to create and start
    stripping out codes one by one.

    Don't know what the minimum(s) are off the top
    of my head.
     
    Jason Piercey, Sep 17, 2004
    #4
  5. mark

    mark Guest

    included all the dxfs still no luck, i am suspecting i missing something
    more obvious

    thanks
     
    mark, Sep 17, 2004
    #5
  6. Post what you are trying, I'll have a look.
     
    Jason Piercey, Sep 17, 2004
    #6
  7. mark

    David Bethel Guest

    For a basic INSERT with ATTRIB:

    (entmake (list (cons 0 "INSERT"); Req'd
    (cons 8 "0")
    (cons 66 1); Req'd
    (cons 2 "CP"); Req'd
    (cons 10 (list 0 0 0)); Req'd
    (cons 41 1)
    (cons 42 1)
    (cons 50 0)
    (cons 43 1)
    (cons 70 0)
    (cons 71 0)
    (cons 44 0)
    (cons 45 0)
    (cons 210 (list 0 0 1))
    (cons 62 256)
    (cons 39 0)
    (cons 6 "BYLAYER")))
    (entmake (list (cons 0 "ATTRIB"); Req'd
    (cons 8 "0")
    (cons 10 (list 0 0 0)); Req'd
    (cons 40 1); Req'd
    (cons 1 "TESTING 123"); Req'd
    (cons 2 TEST"); Req'd
    (cons 70 0)
    (cons 73 0)
    (cons 50 0); Req'd
    (cons 41 1); Req'd
    (cons 51 0)
    (cons 7 "STANDARD")
    (cons 71 0)
    (cons 72 0)
    (cons 11 (list 0 0 0)); Req'd
    (cons 210 (list 0 0 1))
    (cons 74 0)
    (cons 62 256)
    (cons 39 0)
    (cons 6 "BYLAYER")))
    (entmake (list (cons 0 "SEQEND"); Req'd
    (cons 8 "0")))

    Block CP must already be defined in the BLOCK table and have 1 ATTDEF.
    The required ar4e from memory. -David
     
    David Bethel, Sep 17, 2004
    #7
  8. You can create an attributed insert based on
    a block definition that contains zero ATTDEFs.
     
    Jason Piercey, Sep 17, 2004
    #8
  9. mark

    David Bethel Guest

    True, but I wouldn't advise it. -David
     
    David Bethel, Sep 17, 2004
    #9
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.