autocad object custom data

autocad object custom data

Anonymous
Not applicable
564 Views
1 Reply
Message 1 of 2

autocad object custom data

Anonymous
Not applicable

Hello,

I'm writting application for autocad in VBA, and need to store some information with objects.

For example asign some number and string with acad object (line, point arc,....) to identify the object later. I need this information to preserve, when I open the drawing later. Or It could be to create lists of objects handles for identification the object.

Please could You advice how to do it. It is important to save this information with drawing. I don't want to create an external file. I've found dictionary object and xdata property but I don't know if this is suitable for this...

 

Some specific example: there is a trace created from lines, arcs,..... I sort the entities consecutively and need to store the order of the entities..

 

Thanks for help.

michal

 

0 Likes
565 Views
1 Reply
Reply (1)
Message 2 of 2

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

you have the aibility to use ExtendedEntityData or ExtensionDictionary to save data directly onto an entity.

And just to be careful: think about what happens if the user copys this entity with your data (or what should happen to your data, what will happen if you app is not loaded at the time of the copy).

 

So your terms for www-searches are:

  • GetExtensionDictionary
  • GetXData and SetXData

 

Good luck, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes