Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selected item not locked

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
tommam
492 Views, 3 Replies

Selected item not locked

Using Vault Pro 2013, I have a command handler that lets the user select multiple items from explorer, then run my function.  The function calls "GetItemsByIds" for each selected item, then tests if the item is null or locked.  In Vault Explorer, the items have a lock symbol next to them and they are at the "Released" state, but in my function, the test for being locked (selectedItem.Locked) is returning false.  How can this be?

 

Thanks,

Tom

3 REPLIES 3
Message 2 of 4
Redmond.D
in reply to: tommam

The API documentation doesn't provide correct information for Item.Locked. I'll log a defect on this.

 

If you want to see if you can edit an item or not, you will have to explicitly check the item state. 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 4
tommam
in reply to: Redmond.D

OK, but how do I determine if the state locks the item or not?  I can see what lifecycle state the item is in, and I can get the definition for that lifecycle state, but I don't see anywhere that tells me if that state locks the item.  Would I have to call "GetStateACLByLifeCycleStateId" and dig down to see if "AllowWrite" is true?

Message 4 of 4
Redmond.D
in reply to: tommam

Item lifecycle states are not very configurable.  If the state is not work in progress, then the item is locked.  So you can just check to see if SysName is equal to "Work in Progress".



Doug Redmond
Software Engineer
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report