This article will focus on Item properties, so feel free to skip this one if you are not using Vault Professional or do not use Items. If you haven't read the article on Entities, you might want to do that first. And, obviously, parts 1 and 2 should be read.
Item Properties
Items is one of those features where the UI makes it look like things work one way, but at the API level, things are completely different. Unmapped Item UDPs are pretty straightforward. It's when you get into mapped properties that things get confusing.
For example, take the following workflow:
- Create a new Property
- Associate it to File and Item
- Set up the File mappings
- Save the Property
- Upload a file with the property in it. The UDP contains the expected value.
- Assign the file to an item.
- The item does not contain the UDP value like you might expect. The reason is that you still need to set up the Item mapping. The file value doesn't automatically copy over to the item just because the Item box is checked on the property.
Mappings
Items also support mapping between UDP and a Content Source Property. But the meaning is different for Items. Item properties do not map to data within the file.
You know that 'bom' parameter on the add and checkin functions? That's what Item properties map to. The BOM contains bill of materials data for the file. The central objects in the BOM are the BOMComp objects. BOMComp objects can map to Item objects. Therefore BOMProp objects are what the Item UDPs map to.
Content Source Providers
So Item properties still have the concept of a content source property. But the file's BOM is the content source in this case, not the file itself. Again, the content source provider is the glue that hooks the content source property to the UDP. So depending on the file type, the Item mapping behavior may be different.
Reference Designators
This is the only other entity class that supports property mappings. Just like with Items, a Reference Designator property maps to data in the BOM. The only difference is that the mapping is to BOMProp data on a BOMRefDesig object.
AutoCAD Electrical is the only application that sets reference designator BOM data. So mappings are only possible with the content source provider that handles .dwg files.
Next up...
In the fourth and final article, sample code!

Subscribe