- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Handle DocumentSercive.CheckInFileEvents (Vault API) in an Inventor Add in
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good Luck,