Vault Customization

Vault Customization

Distinguished Contributor
Posts: 204
Registered: ‎04-25-2008
Message 11 of 12 (215 Views)

Re: Searching for Files by Criteria - VB .Net using API

08-16-2012 12:26 AM in reply to: Daniel.Dulzo

Dear Daniel

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.

AI2011 Certified Associate
(Soft: PDSU2012, VP2012&VP2013)
Posts: 61
Registered: ‎05-25-2011
Message 12 of 12 (207 Views)

Re: Searching for Files by Criteria - VB .Net using API

08-16-2012 02:58 PM in reply to: MaxU77

Hi MaxU77,


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.



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.