- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I'm using Vault Pro 2025.4 and have built a Vault add-in that handles the ItemService.CommitItemEvents.Post event via the iWebServiceExtension interface.
When I create a new item using the Vault UI, it handles the event as expected.
I also have a custom Data Standard dialogue for AutoCAD that, behind one of the buttons, does this (error checking removed for clarity)
[Autodesk.Connectivity.WebServices.Item]$vaultItem = $vault.ItemService.AddItemRevision($CatId)
[Autodesk.Connectivity.WebServices.StringArray]$stringArray = (New-Object -TypeName Autodesk.Connectivity.WebServices.StringArray)
$stringArray.Items = @($Number)
[Autodesk.Connectivity.WebServices.StringArray[]]$fieldInputs = @($stringArray)
[Autodesk.Connectivity.WebServices.ProductRestric[]]$restrictions = $null
[Autodesk.Connectivity.WebServices.ItemNum[]]$vaultItemNum = $vault.ItemService.AddItemNumbers(@($vaultItem.MasterId), @($NumSchemeId), $fieldInputs, [ref]$restrictions)
$vault.ItemService.CommitItemNumbers(@($vaultItemNum[0].ItemMasterId), @($vaultItemNum[0].ItemNum1))
$vaultItem.ItemNum = $vaultItemNum[0].ItemNum1
$vaultItem.Detail = $Description
$vaultItem.Title = $Title
$vault.ItemService.UpdateAndCommitItems(@($vaultItem))
When I create a new item using the above code, my add-in does not handle the event.
As I understand it, a Web Service Extension catches every event, regardless of which type of client application triggers it.
Does Data Standard follow this behaviour, or does it bypass the event handlers by design, as it appears to in my setup?
Any help gratefully received
Nick
Solved! Go to Solution.
