Autodesk Vault Plug-in Wizard Helps Creating Vault Plug-in More Easily

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.

image

 

Now name your vault plug-in and specify the location as usual. By clicking OK, a wizard form will appear as below:

image

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.

image

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.

image

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. 

image

For Vault Explorer, the wizard also help us to setup the debug option, you can just press F5 to start Explorer for debugging.

image

 

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.

 

Have fun!


Comments

14 responses to “Autodesk Vault Plug-in Wizard Helps Creating Vault Plug-in More Easily”

  1. Hi Daniel,
    This is such a great contribution to the Vault developers community and such a useful tool for someone trying to get something out of its API.
    I wish I had this when I started my first (and only so far :) Vault + Revit APIs project.
    Thanks a bunch and keep up the good working,
    Constantin

  2. Daniel,
    This looks great! Can it be targeted for VS2010?
    David

  3. Typepad HTML Email
    Since VS2013 rolls out already, I expect many developers move to newer IDE, so I would like to skip VS2010. Anyway, if want to do it yourself,
    please feel free to do so based on the source code on github.com.
    Cheers,
    Daniel

  4. Thanks Daniel. That’s what I had in mind. I didn’t expect you to do it. I just wanted to know it was possible.

  5. Hi Daniel,
    I have a question about the wizard. The idea is great, I will combine it with “Generate Permanent Link of Entities in Vault and Open in Thin Client”.
    But I cann’t see the template..
    Is this wizard only compatible with Frame work 4.5.1??
    Regards,
    Jorn

  6. Sorry I mean with 4.0. On my pc is framework 4.5.1 installed…

  7. This version is targeting Autodesk Vault 2014, so .Net Framework 4.0 is needed, it is not targeting .net 4.51.

  8. Alain Morin Avatar
    Alain Morin

    I can not see the templates in; VS Express 2013 File/New Project… Visual Basic/Autodesk and/or Visual C#/Autodesk. I have Framework 4.0, 4.5 and 4.5.1 on Windows 7, and VS Express 2013 for Desktop.

  9. Alain Morin Avatar
    Alain Morin

    How can you target the proper Framework, to be able to see the the Vault template? Is there any threads on this?
    Thank’s!

  10. Alain Morin Avatar
    Alain Morin

    I found in (C:\Users\XXXXX\Documents\Visual Studio 2013\Templates\ProjectTemplates\Visual Basic\Autodesk/VaultPluginVB2014.zip) a Zipped file, so I UnZip to the same folder. Now if I open a project in that folder, everything is there. Is it normal to manualy do this?
    Thank’s!

  11. Alain Morin Avatar
    Alain Morin

    .NET Workframe drop down menu, those not show in Visual Studio Express 2014. We must use other version of VS2014 to see this Wizard.

  12. b.graaf@icn-solutions.nl Avatar
    b.graaf@icn-solutions.nl

    Is this tool still working with or available for Vault 2017/Visual Stusio 2015?

  13. Any news if you update this tool to the 2017 environment?
    Personally I think it is a must-have for every developer working with Vault.

  14. Radu Stancescu Avatar
    Radu Stancescu

    is there any customization that allows you to download multiple files at the same time within Thin Client?
    Thank you.

Leave a Reply to JornCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading