API development and customization is all about automating repetitive tasks and I am sometimes amazed at how much I have been able to do over the years to make end users’ daily tasks easier to accomplish. One place I have fallen short, however, is automating my own repetitive development tasks. That is why decided to create a Visual Studio Template to automate the creation of PDMWorks Enterprise Addins. This is similar to the SolidWorks Software Development Kit offered by SolidWorks for developing SolidWorks Addins.
For those of you who may not be familiar with Visual Studio Templates, they are very similar to SolidWorks Templates. Within SolidWorks Templates, you store things like unit information, material information and dimensioning standards information. Within Visual Studio Templates you store References, source code files (e.g. classes, modules, forms, etc…) and the like. Hitherto, if you wished to create a custom PDMWorks Enterprise Addin, you would create a generic Visual Studio Class Library, add a reference to the PDMWorks Enterprise Type Library (i.e. EDMLib), add a class file that implements the IEdmAddIn5 interface and then add your custom code to the GetAddinInfo and OnCmd event handlers. With the PDMWE Addin Template, all you have to do is select the PDMWE Addin template from Visual Studio’s New Project dialog. All the files and references are added automagically. It is ready to go and all you have to do is add your custom code to the GetAddinInfo and OnCmd event handlers. There is already some custom code there to for your reference. Currently, the Template is only available for Visual Basic but if some C# developer out there wants to send me a stubbed out PDMWorks Enterprise Addin written in C#, then I would be happy to package it into a Visual Studio Template.
This is going to save me a lot of time and I hope it will save you a lot of time too. I also hope it saves SolidWorks API Support a lot of time so that they can spend more time on my Service Requests : ) I guess on one level it is not so bright of me to make this thing public as it will also save time for my competitors in the PDMWorks Enterprise API Consulting world. It seemed like the right thing to do though considering all of the help that people have provided me with over the years. I hope you enjoy it. As always, if you use it, then I ask that you leave a comment with your feedback. It is a small price to pay.
1. Download the installer from here and unzip it.
2. Run the installer. You should see these screens:
Note: The Addin Template will only be installed for the releases of Visual Studio that you have installed. Visual Studio 2005 and 2008 are supported. If the installation is unsuccessful, then you can follow the manual installation steps below.
Finished! Now you are ready to create your first Custom PDMWorks Enterprise Addin using the PDMWE Addin Template.
1. Launch Visual Studio.
2. Select Create Project from the Start Page or File, New, Project from the toolbar.
3. Select PDMWE Addin from the New Project dialog’s Visual Basic folder.
4. Provide a name for your new Addin and press the Ok button.
A new Addin is created for you with a functional PdmweAddin class and a reference to EDMLib. The Addin is functional as is and may be compiled and debugged before adding any additional code if you want to try it out.
1. Go to the installation folder (C:\Program Files\Extensible CAD Technologies\PDMWE Addin Template\ is the default) and find the PDMWEAddin.zip file.
2. Copy the PdmweAddin.zip file to your Visual Basic Project Templates Folder . By default, this folder is located at My Documents\Visual Studio 200X\Templates\Project Templates\Visual Basic
You should now be ready to go!
To uninstall the PDMWE Addin Template, simply find “PDMWE Addin Template” on Add/Remove Programs and uninstall it from there.