Vault Customization

Vault Customization

Reply
Distinguished Contributor
204 Posts
0 Kudos
Registered: ‎04-25-2008
Post 11 of 12

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
61 Posts
8 Kudos
Registered: ‎05-25-2011
Post 12 of 12

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.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!