Would you please clarify a bit how to determine the <PropDefId> of the particular property of known name?
As a keen Vault user I’m used to rely on system property <Provider> while searching manually.
Using the property I can easily separate “Inventor” or “Autocad” files from all the rest.
Coud you please describe the practical steps to determine <PropDefId> for <Provider> file property.
Haven't found this info in VaultAPI.chm
Thanks in advance.
You can use the code found in this article on Doug's blog to either enumerate through the property definitions for each entity class or to search for a property definition based on a system name. The article is a bit older (it's for Vault 2011) but the concept is still sound.
To enumerate through all the PropDef's for a given entity type, you can follow code similiar to what's in the first section which makes use of the GetPropertyDefinitionInfosByEntityClassId() web service method. It'll return a collection of PropDefInfo objects, each of which will contain a PropDef. Alternatively, you can use the GetPropertyDefinitionsByEntityClassId() method to avoid having to access the PropDef object through the PropDefInfo objects. By looking through the collection of PropDef's you can find the property you want to use, along with its Id.
If want to find a property's Id using its system name, follow the description in the second section. Use the FindPropertyDefinitionsBySystemName() method to get a collection of PropDef's matching the specific ones you're looking for. Again, the Id's for the properties can be found on their respective PropDef objects.
Access a broad range of knowledge to help get the most out of your products and services.