- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
For programming purposes (iLogic, VBA, API, Add-ins, etc.), if we want to store information about a document within itself, we have two tools for doing so: Attributes and Properties.
Both of these are essentially "value containers". Both of them are tied to the document itself. And, if we assume we're using custom PropertySets and not the built-in ones, both of them are only accessible via the API; they are not visible anywhere in the user interface.
My question is, why would I choose one over the other for a given application (such as an add-in)? What are the different capabilities of attributes vs. properties? Aside from capabilities, are there any unique behavioral characteristics between them (e.g. how they respond to certain document events)?
From what I understand, AttributeSets have the following unique capabilities/characteristics:
- They can be created on objects other than the document object (an irrelevant point for this discussion)
- They can be created as "transient" (so they only last until the current Inventor session ends)
- In addition to the String, Double, Integer, and Boolean types that Properties can have, Attributes can also have a "Byte Array" type (whatever that means).
So, what is a "byte array"? Am I missing any other unique capabilities/characteristics? Is there any reason not to use Attributes, since they seem more versatile than Properties?
PS: This is potentially a very similar topic to this one: Add-ins: Best way to store AddIn-specific information in a document. But I thought it would be useful to create a dedicated discussion for it, because I haven't seen the distinction between these very similar tools discussed anywhere else.
Solved! Go to Solution.