By Daniel Du
As described in Vault SDK help file, it involves several steps to create a vault plug-in, including adding references, adding vcet.config file, setting additional assembly property and implementing some interfaces. You also need to copy the output files into vault extension folder manually. I found it a little complicated and time consuming, so I went ahead to create a vault plug-in wizard, which helps me creating vault explorer plug-in, custom job handlers, event handlers more easily. If you are interested in this tool, it can be downloaded here. Please note that it is not fully tested, and you are on your own risk to use this wizard.
After you installed this wizard, it should appear in your Visual Studio project templates. The template are available for both C# and VB.NET. This version is targeting Autodesk Vault 2014, so you need to select .Net Framework 4.0, if it does not appear, you probably selected wrong .net framework.
Now name your vault plug-in and specify the location as usual. By clicking OK, a wizard form will appear as below:
You need to check the Vault SDK path, Web Service Extension 3(WSE3) path and Vault Explorer execution path at first run, if it is not correct for you, you need to specify to the correct path and it will be saved for latter use. This wizard helps you creating vault explorer plug-in, custom job handlers or event handlers. With a customized vault explorer plug-in, you can add custom commands, add custom tabs, hide existing commands or subscribe to pre and post events when any Vault Explorer commands are executed. Jobserver is a nice feature that lets you distribute work across the network. Instead of performing a task directly, a job can be queued up so that the work can be done elsewhere. Vault comes with a few built-in job types, but the real power comes in creating your own. You can create your own job by choosing “Custom Job” in wizard. If you want to customize the business logic, you can write event handlers by choosing “Event Handler” in wizard. These handlers will receive notification whenever a Vault client on that machine does an action that you subscribed to.
Then you can get a bare bone vault plug-in project with necessary files and adding necessary references.
The sample plug-in adds the default implementation of interfaces, you need to remove the ones you do not need. The Vault Explorer Plug-in also comes with a HelloWorld sample, you can modify it to create your own explorer plug-in based on it. Please note that if you rename the class name, you also need to change it in vaultplugin.vcet.config accordingly.
For all types of plug-in, a build event is added by wizard to help you copy the output dlls and vcet.config file to %ProgramData%/Autodesk/Vault 2014/Extensions/ folder.
For Vault Explorer, the wizard also help us to setup the debug option, you can just press F5 to start Explorer for debugging.
So, that’s it, simple and easy, right ?
Finally all source code is uploaded to github, https://github.com/ADN-DevTech/Vault-Plugin-Wizard, I would be more than happy if you’d like to keep working on it or report issues there.