Vault Customization

Vault Customization

Reply
Distinguished Contributor
MaxU77
Posts: 204
Registered: ‎04-25-2008
Message 11 of 12 (194 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.

MaxU77,
AI2011 Certified Associate
(Soft: PDSU2012, VP2012&VP2013)
Employee
Daniel.Dulzo
Posts: 61
Registered: ‎05-25-2011
Message 12 of 12 (186 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.

 

Regards



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.