Autodesk Vault Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Edit and update ITEM attachemen ts - ITEM lock remains
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi all,
i have an issue with ITEM's that remains locked after edit (add attachements). Anyone have a clue on why this happens?
All code for updateing the ITEM runs just fine and attachements are added etc. And i run UndoEditItems with the help files says will make sure no locks remains, still the lock do remain.
Try
'all code for update item, no errors raised and result is as aspected
.......
Catch ex As Exception
WebServiceManager.ItemService.UndoEditItems(New Long() {it.Id})
End Try
Any tip is appreciated
Thanks
Solved! Go to Solution.
Re: Edit and update ITEM attachemen ts - ITEM lock remains
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
When you call EditItem you get a new Item object returned. When calling UndoEditItems, make sure to pass in the Id value from that new Item object.
If that's not your problem, you'll have to post more of your code. And post the Exception details too.
Re: Edit and update ITEM attachemen ts - ITEM lock remains
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
the thing is there is no error raised. Code runs fine and result is ok but ITEM remains locked.
Code that edits the item.
.....
'Change ITEM to Work In Progress
it = WebServiceManager.ItemService.UpdateLifeCycleState
'Edit ITEM
it = WebServiceManager.ItemService.EditItem(it.RevId)
'Update and commit ITEM attachements
it = WebServiceManager.ItemService.UpdateAndCommitItem(
'Change item back to released
it = WebServiceManager.ItemService.UpdateLifeCycleState
Re: Edit and update ITEM attachemen ts - ITEM lock remains
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
For lifecycle state changes, you need to first call EditItemLifeCycleStates. The documentation for that function has sample code.
You say you are not getting any errors, so how do you know that things are in a bad state?
Re: Edit and update ITEM attachemen ts - ITEM lock remains
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok, i'll take a look at that, missed it.
i know that things are in a bad state when i try to acces the item manually after my code ran on it. Then i get an dialog (in vault explorer) that says i can not access it because it is locked to the user i used for running the code.


