solidworks-api
solidworks-api copied to clipboard
Create a wiki page with how to get started with SolidDNA
Create a comprehensive wiki page for SolidDNA, with a specific focus on guiding users who have installed our NuGet package on how to effectively utilize SolidDNA in their projects.
I just wrote someone an email explaining the basics:
- Add a reference to the CADBooster.SolidDNA NuGet package
- Add assembly references to all relevant SolidWorks DLLs. Set Embed Interop Types to No.
- Create a class that implements SolidAddIn. Add a GUID and make it COM visible:
- Create a class that implements SolidPlugIn. Add a GUID and make it COM visible:
This might be enough to create an empty add-in. To get it active:
- Close solidworks
- Build your project
- Right-click your project file > Properties 3.1. When you have an old-style Visual Studio project: Find a place to select an external program to run when debugging. Add the path to sldworks.exe 3.2. If you have a new-style project: edit launchSettings.json and add a reference to sldworks.exe
- Open the SolidWorks AddIn Installer tool that's also somewhere in the SolidDNA project on github.
4.1. The goal is to tell solidworks that it has to start up an add-in that can be found in your DLL. Use this method only for debugging, not when releasing anything. You might have to compile this tool first. When you run the exe, it looks like this:
4.2. Select your DLL in the bottom-left, then click Install 4.3. If successful, your add-in appears on the right side in the list of registered add-ins within solidworks.
- Click Start in Visual Studio to start a debugging session. This should start SolidWorks as well.
- Open the list of add-ins. 6.1. If yours is not enabled, enable it 6.2. If it keeps on getting unchecked after checking it, the add-in doesn't start correctly
- The add-in should be active now. You can check it by setting a breakpoint in the YourAddin.ApplicationStartup method, for example.