Building Sample Add-Ins
Building Sample Add-Ins
May 7, 2013
These instructions are for SpaceClaim API V11, even though some of the screenshots are from earlier
versions of the API.
Instructions
1. Open the SpaceClaim_API.chm help file in the SpaceClaim.Api.V11 folder inside the SpaceClaim
installation folder:
2. Go to the Examples page of the help file and download and unzip the sample add-in folder.
4. Open the sample add-in project file using Visual Studio. For a C# project, this is called
SampleAddIn.csproj.
5. The project will be loaded in Visual Studio and the Solution Explorer will show something like
this:
6. Expand the References node, then right-click on the SpaceClaim.Api.V11 reference and select
Remove.
7. Right-click the References node and select Add Reference.
8. Go to the Browse tab and navigate to the SpaceClaim.Api.V11 folder inside the SpaceClaim
installation folder. Select the SpaceClaim.Api.V11.dll assembly and then click OK.
9. Right-click on the sample add-in project node in the Solution Explorer and choose Properties.
10. Go to the Build page:
11. In the Output path field, enter the following path if it is not already set.
C:\ProgramData\SpaceClaim\AddIns\Samples\V11\<SampleAddIn>\
where <SampleAddIn> is the name of the sample add-in project. For the C# sample, this is
simply “SampleAddIn”, so the path would be:
C:\ProgramData\SpaceClaim\AddIns\Samples\V11\SampleAddIn\
12. Click the Build menu in Visual Studio and select Build Solution. Visual Studio will ask you for a
location to save the solution file. Choose a location or accept the default location offered.
13. Start SpaceClaim. The Sample C# V11 ribbon tab (assuming this is the C# sample) should appear
in SpaceClaim with a number of button on it:
Optional – Debugging
If you want to attach a debugging session to SpaceClaim so that you can debug changes to code in the
add-in, take the following actions:
1. Right-click on the sample add-in project node in the Solution Explorer and choose Properties.
2. Go to the Debug page and select the Start external program radio button. Then browse to the
location of the SpaceClaim executable, which is in the SpaceClaim installation folder:
3. Select the Debug menu in Visual Studio and choose Start Debugging.
4. SpaceClaim should start and Visual Studio should be attached to the SpaceClaim process, so that
any breakpoints you place in the add-in code will now be hit.