I'm looking for a way to get the entity name of one object,
store it in any form (ex: attribute of a block) in order to select it in a latter time, after closing and opening the drawing.
that way i will get a file with the name of the entity, and that is a good alternative,
but my major problem is to select the entity again using the stored information.
my first attempt using storedinformation
"<Entity name: 7ec06d68>"
was to try something like this:
(setq entity (ssget "X" '((-1 . storedinformation ))))
You should use an entity's "handle" rather than its "name" if you want to access the entity in a different session. Names can change session to session; handles don't. The handle is the entity's group 5 code. To access entity name, use (handent "handle")
I concur with CarlAK, handles don't change. You might try to embedding XDATA to the entity, but since the handle never changes, you can always query the handle if you store that info somewhere.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.