Hi Andrew,
First of all (entlast) is not something meant to be used 'instead' (cons 0
"INSERT"). The first one is a function in itself which will return the name
of the last nondeleted main object (entity) in the drawing, while (cons 0
"INSERT") is a criteria being used to filter when using (ssget ...) in order
to make sure that the selected entities are of the 'insert' type (which is
the same as a block reference, which is the same as an instance of a block
definition).
So what I suggest, is that after you insert your thing (which I assume it
can be a text string, an image or what ever other entity from another
drawing), from the clipboard, use (entlast), then analyze what (entget
(entlast)) returns. The DXF code 0 will tell you what is the last object:
(0 . "INSERT") -> it's a block reference or an xref
(0 . "IMAGE") -> it's an image
(0 . "TEXT") -> it's text
(0 . "MTEXT") -> it's mtext
(0 . .LINE") -> it's a line
(0 . "CIRCLE") -> it's a circle
(0 . "ACAD_TABLE") -> it's a table
(0 . "TOLERANCE") -> it's a tolerance
(0 . "WIPEOUT") -> it's a wipeout
(0 . "SHAPE") -> it's a shape
and so on, or if you know exactly what object was inserted, you can skip
this step. When you know what the entity is, you can check for the insertion
point of that entity. Remember that only blocks, xrefs (which are special
blocks), mtext, images, tables, tolerances, wipeouts and shapes (hope I
didn't forget something) have insertion points (it's a good thing to read
about DXF codes grouped by entity type in order to see what goes with what).
For all these, the insertion point is associated to code DXF 10 (also might
be 20 and 30 for the tables).
HTH,
Constantin
a écrit dans le message de news:
5519854@discussion.autodesk.com...
so instead of the (cons 0 "insert") i need to use entlast
is that what you are suggesting?