Handle DocumentSercive.CheckInFileEvents (Vault API) in an Inventor Add in

Handle DocumentSercive.CheckInFileEvents (Vault API) in an Inventor Add in

mr
Participant Participant
1,541 Views
3 Replies
Message 1 of 4

Handle DocumentSercive.CheckInFileEvents (Vault API) in an Inventor Add in

mr
Participant
Participant

Is it possible to possible to handle events from the vault API into an inventor add in?

My plan is to perform certain tasks automatically after checking in a file into the vault.

 

That's why I tested various handlers for events, but the events aren't fired.

 

        Implements IWebServiceExtension

            AddHandler DocumentService.CheckinFileEvents.Pre, AddressOf CheckIn
            AddHandler DocumentService.AddFileEvents.Pre, AddressOf AddFile

        Private Sub CheckIn(ByVal sender As Object, ByVal e As CheckinFileCommandEventArgs)
            MsgBox("Test")
        End Sub

        Private Sub AddFile(ByVal sender As Object, ByVal e As AddFileCommandEventArgs)
            MsgBox("Test")
        End Sub

At the add in start up the event handlers will be added, but during a file check in the events are not fired.

 

I think the events are fired by the vault client and my inventor add in doesn't get noticed from that?

 

Is there a way to handle events from the vault into an inventor add in?

 
 
I hope someone has an idea for me, best regards
Marcel Ruzbacky
0 Likes
1,542 Views
3 Replies
Replies (3)
Message 2 of 4

JamieVJohnson2
Collaborator
Collaborator

The answer is Yes it can be done.  The path is not to pretty.  But Autodesk did provide an API for event listening with Vault Professional (as well as Workgroup and Collaboration, but not Basic).  In the Vault Pro SDK file (Vault SDK.chm) there is a topic under Getting Started, called How to handle events.  The first paragraph states:

 

"If you want to customize the business logic, you can write event handlers.  These handlers will receive notification whenever a Vault client on that machine does an action that you subscribed to.  For example if a program tries to check in a file, your code can get notified of that action.  Then you can proceed to block the operation or perform additional tasks."

 

Then it has you proceed to create a project library (dll) to work with the iWebServiceExtension interface and register it as any other Vault Extension is registered (I've written a vault extension with approx. 7 commands and a few WPF screens).

 

I've not tried this, but it sure does look interesting.

 

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
Message 3 of 4

mr
Participant
Participant

I understand your approach, but unfortunately we will start with vault basic in the next few month, just to gain some experience. After gaining some experiences we may be upgrading to vault professional.

Until now we worked without vault and we decided to test the vault basic environment, and so I just started with some inventor customizations to make the work experience smoother.

 

I have already noticed the possibility for the vault client extensions, but I did not have the idea to it for capturing vault events.

 

Nevertheless extensions are not available for our vault basic.

 

Thank you anyway for the note.

 

I try to solve my problem without using vault events.

 

0 Likes
Message 4 of 4

JamieVJohnson2
Collaborator
Collaborator
Use Fiddler to capture the 'web traffic' and you can see, even in Vault Basic, when the calls to the web service are being made. That's the only way around (capturing windows events more generically), because the API does not exist in Vault Basic.



Good Luck,




Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes