#HANDLES
2 messages in this thread
Does anyone know of a way to obtain the "next" entity handle which will be
used in an AutoCAD drawing. I want to have an attribute in a block store
the blocks entity handle. The only way I have found this is to insert the
block with a "default" value for teh attribute then use entlast to find the
just inserted block and then use entnext to step through the subentities
(attributes) until I find the one to hold the handle. I can then modify
that subentity. There has to be an easier way! -rj
Randy – No, there's no way to predict what the next handle will be. And, you
can't rely on the assumption that they are allocated linearly or sequentially
either. You would be putting yourself on thin ice if you did.
I'm not sure why you need to put the handle of the block insertion into one of
the attributes that follows it. The attributes themselves have handles, and
you can (entnext) forward from one of them until you reach the SEQEND, which
holds the entity name of the parent block insertion entity. Wouldn't that be
sufficient?
-TonyT.