Skip to main content
The Sample Add-in project (C#) contains programming examples of how to use various areas of functionality in the API.

Building the sample add-in project

  1. Download the SampleAddin zip file and unzip it. Note: Note: Use the Extract All command on the content menu in Windows Explorer.
  2. In the extracted folder, locate the reference to the NuGet package (NuGet.config) and delete it.
  3. Launch Visual Studio and open the project file (SampleAddin.csproj). Alternatively, you may double-click the project file and open it with Visual Studio.
  4. In the Solution Explorer in Visual Studio, right-click References and select Add Reference.
  5. In the Reference Manager, select the Browse tab. Locate the API assembly in the subfolder inside the Discovery Installation folder. Right-click this reference and set Copy Local to False.
  6. Build the project is Visual Studio. Note: Build the project using x64.
  7. Launch Discovery. The Sample Add-in will appear in the Discovery Ribbon.
Note: Samples that require a beta version of the API must reference that beta version. Note: To build the samples or any add-in, .NET 4.8 is required. If .NET 4.8 is not available to build with in your version of Visual Studio, the Microsoft .NET Framework 4.8 Developer Pack can be downloaded and installed for Visual Studio 2017 and Visual Studio 2019. Note: Sample projects have their build output path set to a folder beneath %ALLUSERSPROFILE%\\SpaceClaim\\AddIns, which means Discovery will automatically find the add-in at start-up (see Manifest Files).

Add-ins frequently asked questions

  1. What can I do when my add-in project can’t build because it’s missing references or packages? Add-ins require several Discovery DLL libraries: Discovery.API.2X SpaceClaim.API.2X SpaceClaim.API.2X.Internal
  2. What can I do when my add-in project is built, but I can’t see it in Discovery? Either the add-in is not completely built, or it is just not visible on Discovery. Check Discovery Settings > Add-in and determine if the add-in is present. If it’s found, go to the Ribbon section in the advanced part. If the add-in is not found, verify that the add-in output files are configured for the Program Data folder. The manifest file will also appear there.