ewan_m Posted April 16, 2010 Posted April 16, 2010 Hi Everyone, I am trying to collect autocad objects and list them in a text file or database. I am trying to find out if the ENAME is all the information about a unique object or if it is a container that holds more. I have two specific goals: 1. Take an entity or Selection Set of entities and turn them into text I can read out and 2. Read from that object back into a selection set so I can manipulate the objects. (e.g. erase them etc.) I have looked over this forum, around the web and through autocad/autolisp help and haven't gotten anything. Can anyone offer a solution to this problem or a work around that has a similar effect? Thanks Quote
MSasu Posted April 16, 2010 Posted April 16, 2010 You should use the handle of the entity (DXF code 5) instead of entity name (DXF code -1) because the name is allocated randomly when the drawing is open and therefore vary between sessions while the handle is unique and constant. Regards, Quote
Lee Mac Posted April 16, 2010 Posted April 16, 2010 I agree with Msasu, and as far as conversion goes, look into either the handent function or vla-HandletoObject. Lee Quote
ewan_m Posted April 18, 2010 Author Posted April 18, 2010 You should use the handle of the entity (DXF code 5) instead of entity name (DXF code -1) because the name is allocated randomly when the drawing is open and therefore vary between sessions while the handle is unique and constant. Regards, Hey, thanks for that, I just wanted to find out how "unique and constant" the handle is. I actually use a system called Munsys which sits on top of Autocad and allows a user to work with geometries from an oracle database. As objects are queried on the fly and not saved except in the database I imagine the handles would change every time they are re-queried (thats ok as I just wanted session based recognition. If they are unique and constant then what happens if i save a drawing twice and then insert one into the other? Thanks Quote
MSasu Posted April 19, 2010 Posted April 19, 2010 Inserted objects are treated as new objects, therefore will receive new handles (unique in target drawing). Regards, Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.