I took a SOLIDWORKS support call the other day and the customer said, “I’m missing my SOLIDWORKS SDK Template files”. My response was, “I can help with that. Do you have a SOLIDWORKS Student Version”? He responded “No”. The reason I asked if he had a student version is the student license uses Student Design Kit (SDK) download files.
The customer told me “I’m trying to use Visual Studio. After I installed SOLIDWORKS and the SOLIDWORKS API SDK files, my API SDK templates are missing.” No project templates are shown in Visual Studio New Project dialog for C# and VB.NET. The SOLIDWORKS API SDK contains all of the functionality you need to develop SOLIDWORKS API applications.
System error happened while installing the templates and registering the Wizard assembly in the Global Assembly Cache (GAC). This might be caused by permission issues.
Once I got my head wrapped around what he was asking. I did some research and below is what I found out.
First thing is to make sure Microsoft Visual Studio is installed. That’s the application he wanted to use alongside SOLIDWORKS.
We then need to make sure the SOLIDWORKS API SDK.msi file was downloaded. This file will be in the C:\Users\<username>\Documents\SOLIDWORKS Downloads\SOLIDWORKS <version>\apisdk folder.
If you don’t have the file, you will need to download from the SOLIDWORKS Customer Portal.
Here is a link to help you download the file set step by step.
Now that we have the file. We can extract the MSI package. You will need to unzip the file using any archive tool which support zip format (WinRar, WinZip or 7-Zip).
You should now have the SOLIDWORKS API SDK folder.
Find swvbaddin.zip for VB.NET template and swcsharpaddin.zip for C# template in the files of the unzipped folder.
Open Visual Studio and select Tools->Options… menu command. Navigate to Projects and Solutions group.
Copy the path of the User project templates location field value and open this folder in the explorer.
Copy the swvbaddin.zip file into the Visual Basic folder and swcsharpaddin.zip into the Visual C# folder. It is not needed to unzip these files.
Start Visual Studio and create new project. Now C# and VB.NET project templates are available for selection.
If the following error is displayed when creating the project:
Navigate to the folder unzipped from the SOLIDWORKS API SDK.msi file and find the SolidWorksToolsWizard.dll.
This dll needs to be registered in the Global Assembly Cache (GAC). Navigate to %windir%\assembly% folder in explorer and drag-n-drop the dll file into the folder.
Follow this link to help guide you through registering GAC.
I hope you find this helpful. Thanks for reading.
Sr. Application Engineer
Computer Aided Technology