Vault General Discussion

Reply
New Member
Most.Ridiculous.Signup.Form.Ever.
Posts: 2
Registered: ‎01-29-2013
Message 1 of 2 (102 Views)
Accepted Solution

How to get the id of a folder category

102 Views, 1 Replies
01-29-2013 12:49 PM

Hi,

 

I need to script the creation of new folders in Vault.  For this I understand I'm to use  the AddFolderWithCategory( name, parent, isLib, categoryId ) method.

 

I can't find the categoryId that would apply to create a folder of type "Project"

 

What method should I use to get an iterable object of folder types each containing, presumably, a possible categoryId to feed as the fourth parameter to the  AddFolderWithCategory( ,,, categoryId ) method?

 

Suggestion: why is the ID not visible in the human-readable properties of categories?  I could easily hard-code this, but I can't even find what to hard-code.

 

Thanks!

New Member
Most.Ridiculous.Signup.Form.Ever.
Posts: 2
Registered: ‎01-29-2013
Message 2 of 2 (85 Views)

Re: How to get the id of a folder category

01-29-2013 07:56 PM in reply to: Most.Ridiculous.Signup.Form.Ever.

I've found clues that lead to the answer.

 

Turns out the EntityClassId value for the 'Folder' Entity type is "FLDR". 

 

This is explained in the VaultAPI.chm under the "Entities and Behaviors" topic.

 

It's ironic that Vault uses INT64 space for its IDs, but uses "FLDR" as opposed to the more literate and wholly logical "FOLDER" for this entity type.  

 

I'm leaving this here because when people search for "Folder" and "Entity Type" it can be a long slog througn a crapton of bum-steers until, finally, this comes to light.  At least that was the case for me.

Announcements
New button for Platinum & Gold Subscription customers
Gold & Platinum Subscription customers can alert Autodesk if they require assistance with their forum post

Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.
Need installation help?

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