PDA

View Full Version : Insert a Block with Attributes and group it with a Leader



shawn.bean
2007-03-30, 09:43 PM
I'm trying to create anonymous blocks with editable attributes via AutoLISP and to tie the same as an insert to a leader the code creates at roughly the same time. I've gotten so far as to be able to create the block definition with the attributes attached (DXFOUT shows the anonymous definition in the DXF file), but I'm encountering difficulties getting the insert created, let alone tied to the leader.

Code is attached. It works fine until I try to uncomment the (entmake) for the insert, then, for some reason, the name of the anonymous block seems to become nil. Can anyone please illuminate me as to what I'm doing wrong, or point me to an example of code that does something similar? Thanks.

-STB

shawn.bean
2007-04-02, 02:43 PM
Umm... time out. Deeper investigation has revealed that the entity name is nil every other time I try to run the code, so I'm missing something in the creation of one of the complex entities--most likely, in the creation of the INSERT. Do I need to define the ATTRIBS and a SEQEND or something similar immediately after I define the INSERT?

*pounds out some quick code to check that idea*

Yup. That's what I was doing wrong. Thanks to everyone who took the time to give consideration to this question.

-STB