VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

autocad object custom data

1 REPLY 1
Reply
Message 1 of 2
Anonymous
447 Views, 1 Reply

autocad object custom data

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

 

Tags (1)
1 REPLY 1
Message 2 of 2
Alfred.NESWADBA
in reply to: Anonymous

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
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost