Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a wiki page with how to get started with SolidDNA #36

Open
KC-MarKamp opened this issue Jul 17, 2023 · 1 comment
Open

Create a wiki page with how to get started with SolidDNA #36

KC-MarKamp opened this issue Jul 17, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@KC-MarKamp
Copy link
Contributor

KC-MarKamp commented Jul 17, 2023

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.

@KC-MarKamp KC-MarKamp added the good first issue Good for newcomers label Jul 17, 2023
@brinkdinges
Copy link
Member

I just wrote someone an email explaining the basics:

  1. Add a reference to the CADBooster.SolidDNA NuGet package
  2. Add assembly references to all relevant SolidWorks DLLs. Set Embed Interop Types to No.
  3. Create a class that implements SolidAddIn. Add a GUID and make it COM visible:
    image
  4. Create a class that implements SolidPlugIn. Add a GUID and make it COM visible:
    image

This might be enough to create an empty add-in. To get it active:

  1. Close solidworks
  2. Build your project
  3. 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
  4. 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:
    image
    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.
  5. Click Start in Visual Studio to start a debugging session. This should start SolidWorks as well.
  6. 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
  7. The add-in should be active now. You can check it by setting a breakpoint in the YourAddin.ApplicationStartup method, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants