Jump to content

Recommended Posts

Posted

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

Posted

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,

Posted

I agree with Msasu, and as far as conversion goes, look into either the handent function or vla-HandletoObject.

 

Lee

Posted
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

Posted

Inserted objects are treated as new objects, therefore will receive new handles (unique in target drawing).

 

Regards,

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...