Data Standard and Vault Event Handler add-in

Data Standard and Vault Event Handler add-in

Nick_Hall
Collaborator Collaborator
295 Views
2 Replies
Message 1 of 3

Data Standard and Vault Event Handler add-in

Nick_Hall
Collaborator
Collaborator

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

 

0 Likes
Accepted solutions (1)
296 Views
2 Replies
Replies (2)
Message 2 of 3

Markus.Koechl
Autodesk
Autodesk
Accepted solution

Hi @Nick_Hall : did you implement two event handlers? For 2025 versions, you need to have a .NET Core-based event handler to capture the CAD application's events and a .NET FW based one to capture Vault Client events. 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 3

Nick_Hall
Collaborator
Collaborator

Thank you, @Markus.Koechl. The use of .NET Core in the CAD application had completely slipped my mind

If I fix that, it should sort out my issue

Nick

0 Likes