The Difference of All Types of Properties in Vault

By Barbara Han

In Vault, the different properties live in different namespaces, so don’t confuse them. The developer must decide which type of property is the right one for interfacing with the ERP system. Usually in most of cases, item properties are used.

First read the article in the API documentation called "Properties and Searching", it answers part of the problem and sets up the terminology to be used below.

Namespaces:
ADMS has several different types of properties, and they live in separate namespaces. The document, item and change order properties are all separate from each other. For example, you can’t take a file property definition ID and apply it to an item.

You can link file properties and item properties together, but those links are pretty weak. Editing an item property will have no direct effect on a linked file property. For purposes of this discussion, items properties and file properties are totally separate.

There are also cases where properties from different domains look the same. A file property instance might have the same name and value as an item property instance. As far as ADMS is concerned, these are separate, they just happen to have the same values.

BOM properties in the document service are property values that live inside a file BOM. The IDs are only useful within the BOM. If you want to match up a BOMProp to a PropDef, you need to use the SetId, PropId and Typ values. However, there is no guarantee that a BOM property will find a match with a file property definition.

Component properties is another property namespace. Components are objects created based on BOM data. They are sort of a halfway point between item and file properties. Most of the internals are hidden at the API level, but component properties do show up in a few places.

The last namespace is the package properties. Packages are used to perform import and export operations at the API level. For exports PkgItem is basically a copy of an Item object in the Item service. For imports, the PkgItem is a preview of an Item that is about to be created. The ID value of a PkgProp object maps to a the Id value of a PropDef object in the item service in the case of an export. If data is being imported, this value will be specific to the import mechanism (such as the column number in a CSV file).

Methods for retrieving properties:
GetPropertyDefinitionInfosByEntityClassId

in the property service retrieves all properties, even group properties.

GetBOMByFileId can be used to retrieve the BOM for a file. The BOM object contains all the needed property definitions.
GetComponentProperties is used to get the component properties.
GetAllItemPropertyDefinitionsExtended in the item service retrieves all item properties.
GetAllChangeOrderPropertyDefinitionsExtended in the change order service retrieve all the change order properties.


Comments

One response to “The Difference of All Types of Properties in Vault”

  1. Example Code!!!!!

Leave a Reply to ShaneCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading