INSERT with entmake

Sa Mite Samite

Usenet Archive
Joined
Jul 29, 2003
Messages
17
Reaction score
0
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 said:
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?

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
 
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 said:
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

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

Tom Berger
 

Latest threads

Back
Top