Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Solidworks Costing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39
At a glance
Powered by AI
This tutorial provides instructions for creating custom PropertyManager pages for SolidWorks add-ins using the SolidWorks API and C# or VB.NET.

This tutorial teaches how to create a custom PropertyManager page for a SolidWorks add-in using the SolidWorks API and C#.

The SolidWorks API SDK contains add-in templates for VB.NET, C#, and C++.

Custom PropertyManager Page Add-in Tutorial Overview

Page 1 of 39

Custom PropertyManager Page Add-in Tutorial Overview


Create a custom PropertyManager page for a SolidWorks add-in using the SolidWorks API and either the SolidWorks VB.NET add-in template or the
SolidWorks C# add-in template.
Because these tutorials launch their own sessions of SolidWorks, please close the current session of SolidWorks and open outside of SolidWorks
install_dir\lang\english\otadvancedapi.chm. These tutorials reference API Help throughout, so also keep open API Help outside of SolidWorks,
install_dir\api\APIHelp.chm.

NREVIOUS
P
EXT TOPIC
TOPIC

Click a link to open a SolidWorks custom PropertyManager page add-in tutorial.

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls

C#

VB.NET

C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

C# Overview
This tutorial shows you how to create a custom SolidWorks PropertyManager page for an add-in using the SolidWorks SwCSharpAddin template and API.
Experience programming in C# in Microsoft Visual Studio .NET is a prerequisite of the tutorial. Carefully read all parts of this tutorial. The screen shots
appearing in many steps show you where and how to modify your C# project. Examine the highlighted code. For your convenience, three fully
implemented classes, whose code you can reference and copy and paste into your C# project, are included with this tutorial. See SwAddin.cs,
UserPMPage.cs, PMPHandler.cs in Completed C# Addin.
In this tutorial, you learn how to:
z
z
z
z
z

Install the SolidWorks API Software Development Kit (SDK).


Use the SolidWorks SwCSharpAddin template to create a C# add-in project in Microsoft Visual Studio .NET.
Compile and run the add-in.
Design the PropertyManager page for the add-in.
Modify the PropertyManager page and add-in.

Installing the SolidWorks API SDK


The SolidWorks API SDK contains add-in templates for VB.NET, C#, and C++. When you install the SolidWorks API SDK, the templates are copied to
various directories.
1. Ensure that you have installed Microsoft Visual Studio .NET (2008 or later) and a compatible version of Microsoft .NET Framework.
2. For instructions on how to download the SolidWorks API SDK, open API Help > SolidWorks API Help > Getting Started > Overview.
3. Click Next on the Welcome to the InstallShield Wizard for SolidWorks API SDK page.
4. Click Install on the Ready to Install the Program page.
5. Click Finish on the InstallShield Wizard Completed page.

Using the SolidWorks C# Add-in Template


Use the SolidWorks SwCSharpAddin template from the SolidWorks API SDK to create a C# add-in project in Microsoft Visual Studio.
1. Open Microsoft Visual Studio.
2. Verify that Tools > Options > Project and Solutions > General > Save new projects when created is selected.
3. Create a new Visual C# project.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 2 of 39

4. Locate and select the SolidWorks add-in template, SwCSharpAddin, from the list of Visual C# installed templates.
5. Type PropertyManagerPageAddin in Name.
6. Browse to the folder where to save the project in Location.
NREVIOUS
P
EXT TOPIC
TOPIC

7. Click OK.

C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

Solution Explorer displays a C# add-in project tree.

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

8. Click Show All Files


application.

in Solution Explorer to view all of the references, add-in classes, and bitmap files that you can use or modify for your

References
C# Add-in Classes
Bitmap Files

Compiling and Running the Add-in


Compile and run the add-in that is created by the SolidWorks SwCSharpAddin template.
1. Ensure that no SolidWorks sessions are running.
2. To debug in Visual Studio, point the debugger's start program to your SolidWorks executable by right-clicking the project in Solution Explorer.
3. Select Properties, click the Debug tab, select Start external program, and click

4. Click Start Debugging

to navigate to the SolidWorks executable on your system.

in the Microsoft Visual Studio IDE toolbar to compile and run the add-in and start SolidWorks.

5. Select C# Addin > CreateCube in SolidWorks.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 3 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

Boss-Extrude1 is added to the FeatureManager design tree.


To see the C# Addin tab in CommandManager, select View > Toolbars > CommandManager.
6. Select C# Addin again.

7. Select Show PMP.


The add-in's Sample PMP PropertyManager page is displayed on the PropertyManager tab.

8. Select the Sample Group 2 checkbox to expand it.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 4 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

9. Mouse over each control to see its tooltip.


10. Click Stop Debugging

in the Microsoft Visual Studio IDE toolbar.

SolidWorks closes.

Designing a PropertyManager Page


Now that you have seen what the SwCSharpAddin template created, it is time to design the PropertyManager page to do some useful work.
The first step in any good design is to define the use cases or tasks that the PropertyManager page provides. After defining the use cases, think about the
user interface and behavior needed to implement the use cases. Paper or software mock-ups improve usability, especially if tested by several users.
Because you are using the SolidWorks API SDK and the SolidWorks API to implement the use cases of your PropertyManager page, keep in mind during
the design:
z
z

the types of user-interface controls supported by the SolidWorks API. See SolidWorks API Help > Getting Started > Programming with the
SolidWorks API > PropertyManager Pages > Using IPropertyManagerPage2.
the limits on the number of each type of control on any PropertyManager page. See SolidWorks API Help > SolidWorks APIs >
SolidWorks.Interop.sldworks Namespace > Interfaces > IPropertyManagerPage2.

The SwCSharpAddin template created two classes for the PropertyManager page of its add-in:
z
z

UserPMPage.cs
PMPHandler.cs

Using these classes as a starting point, you will use the SolidWorks API to change the add-in's user interface and behavior. The add-in's PropertyManager
page looks and feels similar to the other SolidWorks PropertyManager pages, but it also has a specialized workflow.
Your add-in's PropertyManager page workflow will:
1. Select an edge.
2. Modify its length.
3. Rebuild the model.
The workflow uses a few of the controls from the template add-in:
z

Selection box
Spin/combo box

Button

To implement this workflow, your add-in will:


z

expand a group of controls on startup.

change titles, selection filters, and locations of controls.


add a button control to a group box.
add multiple tabs.

z
z
z
z
z
z

remove unused controls.


resize the extrusion.
add standard icon labels to controls.
align a control.

Expanding a Group on Startup


Currently one group box displays with a checkbox that configures the visibility of the contents on startup. You want the group box contents to be always
visible on startup, so you must change the options on the group box.
1. Double-click UserPMPage.cs in Solution Explorer to open it in the Microsoft Visual Studio editor.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 5 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

2. To increase the size of the editor pane, close the Solution Explorer window by clicking X in its title bar.
3. Locate the protected void AddControls() method in the code.

4. Add swAddGroupBoxOptions_e.swGroupBoxOptions_Expanded and remove swAddGroupBoxOptions_e.swGroupBoxOptions_Checkbox from group2's


options bitmask. Because this is the same options setting as for group1, you can simply comment out the second options assignment. The same
options parameter is then passed to the AddGroupBox()constructor for both group boxes. To learn more about the bitmask enumeration
swAddGroupBoxOptions_e, see SolidWorks API Help > SolidWorks Enumerations > SolidWorks.Interop.swconst Namespace >
Enumerations > swAddGroupBoxOptions_e.

5. Click Start Debugging

in Microsoft Visual Studio.

SolidWorks starts up.


6. Select C# Addin > Create Cube in SolidWorks.
7. Select C# Addin > Show PMP.
Sample Group 2 is now expanded on start-up, and the checkbox is removed.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 6 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

8. Click Stop Debugging

in the IDE.

Changing Titles and Location of Controls


Change the titles of your PropertyManager page and its group boxes and move controls from one group to another.
1. Locate the protected void CreatePropertyManagerPage() method and change the title string for swPropertyPage from "Sample PMP" to
"Extrusion PMP".

2. In the AddControls() method, change the title string for group1 from "Sample Group 1" to "Modify Extrusion".
3. Change the title string for group2 from "Sample Group 2" to "Rebuild the Model".

4. Change selection1 from group2 to group1 and change num1 from group2 to group1.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 7 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

5. Click

to compile and run the add-in.

6. Select C# Addin > Create Cube and Show PMP.


7. Verify your changes by inspecting the Extrusion PMP PropertyManager page.

8. Click

to stop the debugger.

Adding a Button Control


Add a button control to group2.
1. Locate #region Property Manager Page Controls.
2. Declare button1 of type IPropertyManagerPageButton and declare unique control ID, button1ID.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 8 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

3. At the beginning of the AddControls() method, controlType, align, and options variables are declared. In AddControls(), immediately
before //selection1, assign these variables to control type, alignment, and visibility options as defined in the SolidWorks enumerators,
swPropertyManagerPageControlType_e, swPropertyManagerPageControlLeftAlign_e, swAddControlOptions_e.

4. Immediately after the controlType, align, and options assignments for button1, add the button1 control to group2 with a Redraw label, Click to
redraw tooltip, controlType, align, and options parameters.

5. Click

to compile and run the add-in.

6. Select C# Addin > Create Cube and Show PMP.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 9 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

7. Click

to stop the debugger.

Adding Multiple Tabs


Multiple tabs in the PropertyManager page give users more functionality and help organize tasks into a workflow.
1. Declare IPropertyManagerPageTab variables tab1 and tab2 and unique values for control IDs, tab1ID and tab2ID.

2. At the beginning of AddControls(), add two tab controls with captions Step 1 and Step 2.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 10 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

3. At the end of AddControls(), add group1 to tab1, add group2 to tab2, and activate tab1 on startup.

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

4. Open SwAddin.cs in the editor.


5. In #region Property Manager Variables, change the scope of ppage to public so that other classes can access the UserPMPage object at runtime.

6. In UserPMPage.cs, add public method DisplayControls() which sets visibility of the group on each tab depending on the tab ID input parameter.

7. Open PMPHandler.cs in the editor.


8. Add code to the OnTabClicked() event handler to call UserPMPage.DisplayControls() to hide and display controls according to tab selection.

9. In UserPMPage.cs, initialize tab1 with a call to DisplayControls() after activating the tab.

10. Compile and run the add-in.


11. Select C# Addin > Create Cube C# and Show PMP.
Two tabs display in the Extrusion PMP PropertyManager page. Each tab contains a different set of controls.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 11 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

12. Stop the debugger.

Removing Unused Controls and Event Handlers


Remove controls and event handlers that are not being used.
1. In UserPMPage.cs in #region Property Manager Page Controls, remove or comment out all control declarations except button1, selection1,
and num1. Do not delete the tab and group declarations.
2. Remove or comment out all control IDs except group1ID, group2ID, tab1ID, tab2ID, selection1ID, num1ID, button1ID.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 12 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

3. In AddControls(), remove or comment out assignments for textbox1, checkbox1, option1, option2, option3, list1, and combo1 and all of their
controlType, align, and options assignments and other related code.
Because PMPHandler.cs must fully implement the interface IPropertyManagerPage2Handler9, do not delete any event handling methods from
PMPHandler.cs. AfterClose() and OnClose() must contain code to prevent the .NET runtime environment from performing garbage collection at
the wrong time. With the exception of AfterClose() and OnClose(), methods that do not return anything (i.e., declared void) can be empty.
4. Click

to compile and run the add-in.

5. Show the Extrusion PMP PropertyManager page.


The unused controls have been removed.

6. Stop the debugger.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 13 of 39

Configuring Selection and Numberbox Controls


Change the options on two of the remaining controls in the PropertyManager page.

The selection1 control should accept only one model edge.


The num1 control should be initialized to a value of 0.0 mm.

The tooltip for each control needs to be modified.

1. In UserPMPage.cs in AddControls(), for selection1:

Change the caption to "Selection".


Change the tooltip to "Select an edge in the main view".
Change filter to select only edges.

Set the SingleEntityOnly property to true so that only one selection is allowed.

Change the Height property from 40 to 25.

z
z

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

2. For num1:
z
z
z
z

Change the caption to "Edge Size".


Change the tooltip to "Select an edge length".
Change the starting spin box value from 50.0 to 0.0.
Replace SetRange() with SetRange2().

In SetRange2(), change:
{

unit type to swNumberBox_Length.

minimum to 0.0.
maximum to 0.1.
inclusive to true.
increment to 0.001.
fast increment to 0.005.
slow increment to 0.0001.

{
{
{
{
{

Set DisplayedUnit to swLengthUnit_e.swMM to display millimeters.

3. Compile and run the add-in.


4. Show the Extrusion PMP PropertyManager page.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 14 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

5. Stop the debugger.

Modifying Control Event Handlers


Complete the PropertyManager page workflow use case by modifying the event handlers of your three controls and adding some helper methods.
The selection1 control displays the edge that a user clicks in the main view. The event handler for selection1, OnSubmitSelection(), returns some event
information, including the selected edge, before submitting the selection to the selection box. Because edges in an extrusion are not features, they have
no presence in the FeatureManager design tree and are difficult to identify. Therefore, you must give each edge of the extrusion a handle or ID. If you
create the extrusion sketch along x and y axes using Create3PointCornerRectangle(), you know in advance what axis each edge is on. Then you can
determine which axis of the extrusion needs to be resized for the selected edge at runtime.
1. Open SwAddin.cs in the editor.
2. Create public method StoreEdgeIds()in #region UI Callbacks to store IDs for all 12 edges in the extrusion.

3. In #region Local Variables, declare public variables of type Edge for each edge and public variables, x, y, and extrusion of type double. Initialize
x, y, and extrusion to 0.1. Also declare public variable modDoc.

4. In CreateCube():

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

set x, y, and extrusion to .1.

remove IModelDoc2 from modDoc declaration.

replace modDoc.InsertSketch2 with modDoc.SketchManager.InsertSketch.

replace modDoc.SketchRectangle with modDoc.SketchManager.Create3PointCornerRectangle.

z
z

specify (0,0,0), (x,0,0), and (0,y,0) to align the sketch's x and y axes.
replace FeatureExtrusion() with FeatureExtrusion2()

in featMan.FeatureExtrusion2(), replace .1 with "extrusion".

add a call to StoreEdgeIDs().

Page 15 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

5. Add a public method GetAxisOfSelectedEdge() in #region UI Callbacks, whose input parameter is the selected object from the event handler and
whose return string contains the calculated axis.

6. Add public String axis to #region Local Variables.

7. Because GetAxisOfSelectedEdge() must populate the num1 control of UserPMPage with the current length of the selected edge, add public method
SetNum1() in UserPMPage.cs to set the value of the private variable num1.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

8. In PMPHandler.cs in OnSubmitSelection(), call userAddin.GetAxisOfSelectedEdge() to calculate the axis of the edge.

Page 16 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
9. Because PMPHandler needs to store the axis for later use, declare the axis variable at the top of PMPHandler.cs and initialize axis to "extrusion" in
the constructor of the handler.

Using the SolidWorks


VB.NET Add-in Template

Modifying Numberbox and Button Control Event Handlers


The numberbox is a spin box control that displays the length of the selected edge. When the user types a value in numberbox the event handler,
OnNumberboxChanged(), returns the value.
The button control on the Step 2 tab rebuilds the model. The button's event handler OnButtonPress() calls a helper method to rebuild the model and
complete the workflow.
1. In PMPHandler.cs, declare double variable edgeSize and initialize it to .1 in the handler's constructor.

2. In OnNumberboxChanged(), assign edgeSize to the handler's input parameter val.

3. In SwAddin.cs in #region UI Callbacks, add public method ModifyCube(), which takes as input parameters edgeSize and axis, which are stored
by the event handler. Like CreateCube(), ModifyCube() extrudes a sketch. Also like CreateCube(), ModifyCube() stores edge IDs. But unlike
CreateCube(), ModifyCube() does not reset the extrusion parameters to 0.1, so that the user can continue to change edge lengths and re-extrude.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 17 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

4. In PMPHandler.cs in OnButtonPress(), call userAddin.ModifyCube(), passing in edgeSize and axis to rebuild the cube.

5. Compile and run the add-in.


6. Show the Extrusion PMP PropertyManager page.
7. Select an edge in the model view.
The current length displays in the number box. Type a new length for the edge; for example, 50.
8. Click Step 2 and Redraw and examine the cube to verify that the selected edge's length changed.
9. Stop the debugger.

Adding Visual Cues


In most PropertyManager pages, icons give the user a visual cue as to what a nearby control does. The SolidWorks user expects these visual cues.
Add a length visual cue before the numberbox control and an edge visual cue before the selection control. Also, add a bitmap icon to the title bar.
1. At the beginning of UserPMPage.cs, add using System.Reflection; and using SolidWorksTools.File;.

Why Did I Add These Namespaces?


2. In Windows Explorer, navigate to install_dir\samples\tutorial\api\addin.
3. Copy pm_extruded_block.bmp to your add-in project, in the same subdirectory where the other project bitmap files reside.
4. In Solution Explorer, right-click the project and select Add > Existing Item.
5. Select pm_extruded_block.bmp and click Add.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 18 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
6. In Solution Explorer, right-click pm_extruded_block.bmp and select Properties.

Using the SolidWorks


VB.NET Add-in Template

7. Click the down-arrow button in the Build Action row and change Content to Embedded Resource.

Adding Icons to Title Bar and Controls


Use the bitmap resource you just added to your project to add an icon to the title bar. Add standard SolidWorks icon labels to the controls of your
PropertyManager page.
1. At the top of UserPMPage.cs, declare variables iBmp and thisAssembly.

2. In the constructor of UserPMPage, initialize iBmp and thisAssembly before calling CreatePropertyManagerPage().

3. In CreatePropertyManagerPage(), use iBmp.CreateFileFromResourceBitmap() to create a runtime local file containing pm_extruded_block.bmp.


Pass the local bitmap file to swPropertyPage.SetTitleBitmap2().

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 19 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

4. In AddControls()after setting its selection filter, cast selection1 to IPropertyManagerPageControl and add standard SolidWorks bitmap label
swBitmapLabel_SelectEdge to the control.

5. In AddControls()after setting its display units, cast num1 to IPropertyManagerPageControl and add standard SolidWorks bitmap label
swBitmapLabel_LinearDistance to the control.

6. Compile and run the add-in.


7. Show the Extrusion PMP PropertyManager page.
The icons appear at the SolidWorks standard distance to the left of their controls on the PropertyManager page. The title icon appears in the title bar.

8. Stop the debugger.

Changing Alignment of Controls


By default, the alignment of each control is left-aligned and stacked vertically on the page as each control is added to the page or group (e.g.,
group.AddControl()). This is the best way to ensure a look and feel that emulates the SolidWorks PropertyManager pages. However, if you want to place
controls differently, like in a single row, you can cast each control variable to IPropertyManagerPageControl and use Top(), Left() and Width() to set
location and size in dialog units relative to the group box boundaries:
z
z
z

Left edge is 0 dialog units.


Right edge is 100 dialog units.
Top edge is 0 dialog units.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 20 of 39

Center the Redraw button using IPropertyManagerPageControl.


1. In UserPMPage.cs in AddControls(), locate group2's button1.
2. After group2.AddControl(), cast button1 to IPropertyManagerPageControl and set Left to 25.
NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

3. Compile and run the add-in.


4. Verify the change in the Extrusion PMP PropertyManager page.
5. Feel free to continue experimenting with controls alignment.

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

Congratulations! You have completed this tutorial.

Return to the tutorials overview page.

VB.NET Overview
This tutorial shows you how to create a custom SolidWorks PropertyManager page for an add-in using the SolidWorks SwVBAddin template and API.
Experience programming in VB.NET in Microsoft Visual Studio .NET is a prerequisite of the tutorial. Carefully read all parts of this tutorial. The screen
shots appearing in many steps show you where and how to modify your VB.NET project. Examine the highlighted code. For your convenience, three fully
implemented classes, whose code you can reference and copy and paste into your VB.NET project, are included with this tutorial. See SwAddin.vb,
UserPMPage.vb, PMPHandler.vb in Completed VB.NET Addin.
In this tutorial, you learn how to:

Install the SolidWorks API Software Development Kit (SDK).


Use the SolidWorks SwVBAddin template to create a VB.NET add-in project in Microsoft Visual Studio .NET.
Compile and run the add-in.
Design the PropertyManager page for the add-in.

Modify the PropertyManager page and add-in.

z
z
z

Installing the SolidWorks API SDK


The SolidWorks API SDK contains add-in templates for VB.NET, C#, and C++. When you install the SolidWorks API SDK, the templates are copied to

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 21 of 39

various directories.
1. Ensure that you have installed Microsoft Visual Studio .NET (2008 or later) and a compatible version of Microsoft .NET Framework.
2. For instructions on how to download the SolidWorks API SDK, open API Help > SolidWorks API Help > Getting Started > Overview.
3. Click Next on the Welcome to the InstallShield Wizard for SolidWorks API SDK page.

NREVIOUS
P
EXT TOPIC
TOPIC

4. Click Install on the Ready to Install the Program page.

C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls

5. Click Finish on the InstallShield Wizard Completed page.

Using the SolidWorks VB.NET Add-in Template

Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls

Use the SolidWorks SwVBAddin template from the SolidWorks API SDK to create a VB.NET add-in project in Microsoft Visual Studio.

VB.NET Overview

NEXT TOPIC

1. Open Microsoft Visual Studio.


2. Verify that Tools > Options > Project and Solutions > General > Save new projects when created is selected.

Using the SolidWorks


VB.NET Add-in Template

3. Create a new Visual Basic project in Microsoft Visual Studio.


4. Locate and select the SolidWorks add-in template, SwVBAddin, from the list of Visual Basic installed templates.
5. Type PropertyManagerPageAddin in Name.
6. Browse to the folder where to save the project in Location.
7. Click OK.
Solution Explorer displays a VB.NET add-in project tree.

8. Click Show All Files


application.

in Solution Explorer to view all of the references, add-in classes, and bitmap files that you can use or modify for your

References
VB.NET Add-in Classes
Bitmap Files

Compiling and Running the Add-in


Compile and run the add-in that is created by the SolidWorks SwVBAddin template.
1. Ensure that no SolidWorks sessions are running.
2. To debug in Visual Studio, point the debugger's start program to your SolidWorks executable by right-clicking the project in Solution Explorer.
3. Select Properties, click the Debug tab, select Start external program, and click

4. Click Start Debugging

to navigate to the SolidWorks executable on your system.

in the Microsoft Visual Studio IDE toolbar to compile and run the add-in and start SolidWorks.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 22 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
5. Select VB Addin > CreateCube in SolidWorks.

C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

Boss-Extrude1 is added to the FeatureManager design tree.


To see the VB Addin tab in CommandManager, select View > Toolbars > CommandManager.
6. Select VB Addin again.

7. Select Show PMP.


The add-in's Sample PMP PropertyManager page is displayed on the PropertyManager tab.

8. Select the Sample Group II checkbox in the PropertyManager page.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 23 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

9. Mouse over each control to see its tooltip.


10. Click Stop Debugging

in the Microsoft Visual Studio IDE toolbar.

SolidWorks closes.

Designing a PropertyManager Page


Now that you have seen what the SwVBAddin template created, it is time to design the PropertyManager page to do some useful work.
The first step in any good design is to define the use cases or tasks that the PropertyManager page provides. After defining the use cases, think about the
user interface and behavior needed to implement the use cases. Paper or software mock-ups improve usability, especially if tested by several users.
Because you are using the SolidWorks API SDK and the SolidWorks API to implement the use cases of your PropertyManager page, keep in mind during
the design:
z

the types of user-interface controls supported by the SolidWorks API. See SolidWorks API Help > Getting Started > Programming with the
SolidWorks API > PropertyManager Pages > Using IPropertyManagerPage2.

the limits on the number of each type of control on any PropertyManager page. See SolidWorks API Help > SolidWorks APIs >
SolidWorks.Interop.sldworks Namespace > Interfaces > IPropertyManagerPage2.

The SwVBAddin template created two classes for the PropertyManager page of its add-in:
z
z

UserPMPage.vb
PMPHandler.vb

Using these classes as a starting point, you will use the SolidWorks API to change the add-in's user interface and behavior. The add-in's look and feel are
similar to other SolidWorks PropertyManager pages, but this add-in will have a specialized workflow.
Your PropertyManager page workflow is a three-step process:
1. Select an edge.
2. Modify its length.
3. Rebuild the model.
The workflow uses a few of the controls from the add-in template:
z

Selection box

Spin/combo box
Button

To implement this workflow, your add-in will:


z
z
z
z
z
z
z
z

expand a group of controls on startup.


change titles, selection filters, and locations of controls.
add a button control to a group box.
add multiple tabs.
remove unused controls.
resize the extrusion.
add standard icon labels to controls.
align a control.

Expanding a Group on Startup


Currently one group box displays with a checkbox that configures the visibility of the contents on startup. You want the group box contents to be always
visible on startup, so you must change the options on the group box.
1. Double-click UserPMPage.vb in Solution Explorer to open it in the Microsoft Visual Studio editor.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 24 of 39

2. To increase the size of the editor pane, close the Solution Explorer window by clicking X in its title bar.
3. Locate the AddControls() subroutine in the code.
4. To specify the same options setting for both group1 and group2, you can simply comment out the options assignment before the group2
assignment. The same options parameter is then passed to the AddGroupBox()constructor for both group boxes. To learn more about the bitmask
enumeration swAddGroupBoxOptions_e, see SolidWorks API Help > SolidWorks Enumerations > SolidWorks.Interop.swconst Namespace >
Enumerations > swAddGroupBoxOptions_e.

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

5. Click Start Debugging

in Microsoft Visual Studio.

SolidWorks starts up.


6. Select VB Addin > Create Cube in SolidWorks.
7. Select VB Addin > Show PMP.
Sample Group II is now expanded on start-up, and the checkbox is removed.

8. Click Stop Debugging

in the IDE.

Changing Titles and Groups


Change the titles of your PropertyManager page and its group boxes and move controls from one group to another.
1. Locate the CreatePage() subroutine and change the title string for ppage from "Sample PMP" to "Extrusion PMP".

2. In the AddControls() subroutine, change the title string for group1 from "Sample Group I" to "Modify Extrusion".
3. Change the title string for group2 from "Sample Group II" to "Rebuild the Model".

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 25 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
4. Change selection1 from group2 to group1 and change num1 from group2 to group1.

Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

5. Click

to compile and run the add-in.

6. Select VB Addin > Create Cube and Show PMP.


7. Verify your changes by inspecting the Extrusion PMP PropertyManager page.

8. Click

to stop the debugger.

Adding a Button Control


Add a button control to group2.
1. Locate #Region "Property Manager Page Controls".
2. Declare button1 as a PropertyManagerPageButton and declare button1ID as an Integer of value 10.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 26 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

3. At the beginning of the AddControls() subroutine, controlType, leftAlign, and options variables are declared. In AddControls()before the
Combo1 section, add a Button1 section assigning control type, alignment, and visibility options as defined in the SolidWorks enumerators,
swPropertyManagerPageControlType_e, swPropertyManagerPageControlLeftAlign_e, swAddControlOptions_e.

4. Immediately after the controlType, align, and options assignments for button1, add the button1 control to group2 with a Redraw label, a Click
to redraw tooltip, controlType, align, and options parameters.

5. Click

to compile and run the add-in.

6. Select VB Addin > Create Cube and Show PMP.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 27 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

7. Click

to stop the debugger.

Adding Multiple Tabs


Multiple tabs in the PropertyManager page give users more functionality and help to organize tasks into a workflow.
1. In #Region "Property Manager Page Controls", declare tab1 and tab2 as PropertyManagerPageTab types and declare tab1ID and tab2ID as
Integer types of values 11 and 12, respectively.

2. Add accessors to tab1ID and tab2ID.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 28 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
3. At the beginning of AddControls(), add two tab controls with captions Step 1 and Step 2.

Using the SolidWorks


VB.NET Add-in Template

4. At the end of AddControls(), add group1 to tab1, add group2 to tab2, and activate tab1 on startup.

5. Open SwAddin.vb in the editor.


6. In #Region "Local Variables", add a public property to access ppage from other classes.

7. In UserPMPage.vb, add subroutine DisplayControls() which sets visibility of the control groups depending on the tab ID input parameter.

8. Open PMPHandler.vb in the editor.


9. Add code to the OnTabClicked() event handler to call UserPMPage.DisplayControls() to hide and display control groups according to tab selection.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 29 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

10. In UserPMPage.vb, populate tab1 by calling DisplayControls() after activating tab1.

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

11. Compile and run the add-in.


12. Select VB Addin > Create Cube and Show PMP.
Two tabs display in the Extrusion PMP PropertyManager page. Each tab contains a different group of controls.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 30 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

13. Stop the debugger.

Removing Unused Controls and Event Handlers


Remove controls and event handlers that are not being used.
1. In UserPMPage.vb in #Region "Property Manager Page Controls", remove or comment out all control declarations except button1, selection1,
and num1. Do not delete the tab and group declarations.
2. Remove or comment out all control ID declarations except group1ID, group2ID, tab1ID, tab2ID, selection1ID, num1ID, button1ID.

3. In AddControls(), remove or comment out assignments for checkbox1, option1, option2, option3, list1, and combo1 controls and all of their
controlType, align, and options assignments.
Because PMPHandler.vb must fully implement the interface IPropertyManagerPage2Handler9, do not delete any event handling subroutines from
PMPHandler.vb. AfterClose() and OnClose() must contain code to prevent the .NET runtime environment from performing garbage collection at
the wrong time.
4. Click

to compile and run the add-in.

5. Show the Extrusion PMP PropertyManager page.


The unused controls have been removed.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 31 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

6. Stop the debugger.

Configuring Selection and Numberbox Controls


Change the options on two of the remaining controls in the PropertyManager page.
z

The selection1 control should accept only one model edge.

The num1 control should be initialized to a value of 0.0 millimeters.

The tooltip for each control needs to be modified.


1. In UserPMPage.vb in AddControls(), for selection1:
z

Change the caption to "Selection".

Change the tooltip to "Select an edge in the main view".


Change filter to select only edges.

z
z
z

Set the SingleEntityOnly property to true so that only one selection is allowed.
Change the Height property from 50 to 25.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 32 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

2. For num1:
z

Change the caption to "Edge Size".

Change the tooltip to "Select an edge length".

Change the spin box starting value from 50.0 to 0.0.


Replace SetRange() with SetRange2().

In SetRange2(), change:
{

unit type to swNumberBox_Length.

minimum to 0.0.

maximum to 0.1.
inclusive to True.
increment to 0.001.

{
{
{
{

fast increment to 0.005.


slow increment to 0.0001.

Set the DisplayedUnit property to swLengthUnit_e.swMM to display millimeters.

3. Compile and run the add-in.


4. Show the Extrusion PMP PropertyManager page.

5. Stop the debugger.

Modifying Control Event Handlers


Complete the PropertyManager workflow by modifying the event handlers of your three controls and adding some helper subroutines.
The selection1 control displays the edge that a user selects in the main view. The event handler for selection1, OnSubmitSelection(), returns some
event information, including the selected edge, before submitting the selection to the selection box. Because edges in an extrusion are not features, they
have no presence in the FeatureManager design tree and are difficult to reference. Therefore, to reference the selected edge you must first give each edge

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 33 of 39

of the extrusion a handle or ID. If you create the extrusion sketch along x and y axes using Create3PointCornerRectangle(), you know in advance what
axis the selected edge is on and can re-extrude accordingly.
1. Open SwAddin.vb in the editor.
2. Create subroutine StoreEdgeIds()in #Region "UI Callbacks" to store IDs for all 12 edges in the extrusion.
NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

3. In #region "Local Variables", declare 12 edge variables as Edge types and declare x, y, and extrusion as double types. Initialize x, y, and
extrusion to 0.1. Declare model as a ModelDoc2 type.

4. In CreateCube():
z

set x, y, and extrusion to 0.1.

remove the model declaration.

replace model.InsertSketch2 with model.SketchManager.InsertSketch.


replace model.SketchRectangle with model.SketchManager.Create3PointCornerRectangle.

specify (0,0,0), (x,0,0), and (0,y,0) to align the sketch's x and y axes.
replace FeatureExtrusion() with FeatureExtrusion2().

in featMan.FeatureExtrusion2(), replace 0.1 with "extrusion".

add a call to StoreEdgeIDs().

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 34 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

5. Add a public function GetAxisOfSelectedEdge() in #region "UI Callbacks", whose input parameter is the selected edge and whose return string
contains its calculated axis (x, y, or extrusion).

6. Declare axis as a String in #Region "Local Variables".

7. Because GetAxisOfSelectedEdge() populates the num1 control with the current length of the selected edge, in UserPMPage.vb add public
subroutine SetNum1() to set the value of private variable num1.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

8. In PMPHandler.vb in OnSubmitSelection(), call userAddin.GetAxisOfSelectedEdge() to calculate the axis of the selected edge.

Page 35 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
9. Because PMPHandler must store the selected axis for later use, declare axis as a String type at the top of PMPHandler.vb and initialize axis to
"extrusion" in the Init() function of the handler.

Using the SolidWorks


VB.NET Add-in Template

Modifying Numberbox and Button Control Event Handlers


The num1 control is a spin box that displays the length of the selected edge. When the user types a value in the spin box, its event handler
OnNumberboxChanged() returns the value.
The button control on the Step 2 tab rebuilds the model. The button's event handler OnButtonPress() calls a helper subroutine to rebuild the model and
complete the workflow.
1. In PMPHandler.vb, declare edgeSize as a Double type and initialize it to 0.1 in the handler's Init() function.

2. In OnNumberboxChanged(), set edgeSize to the value returned by the spin box control, val.

3. In SwAddin.vb in #Region "UI Callbacks", add public subroutine ModifyCube(), which takes input parameters edgeSize and axis passed by the
handler. Like CreateCube(), ModifyCube() extrudes a sketch and stores edge IDs. Unlike CreateCube(), ModifyCube() does not use the original
extrusion parameters, but rather uses edgeSize and axis to re-extrude.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 36 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

4. In PMPHandler.vb in OnButtonPress(), call userAddin.ModifyCube(), passing in edgeSize and axis to rebuild the cube.

5. Compile and run the add-in.


6. Show the Extrusion PMP PropertyManager page.
7. Select an edge in the model view.
The current length displays in the number box.
8. Type a new length for the edge; for example, 50.
9. Click Step 2 and Redraw and examine the cube to verify that the selected edge's length changed.
10. Stop the debugger.

Adding Visual Cues


In most PropertyManager pages, icons give the user a visual cue as to what a nearby control does. The SolidWorks user expects these visual cues.
Add a length visual cue before the spin box control and an edge visual cue before the selection control. Also, add a bitmap icon to the title bar.
1. At the beginning of UserPMPage.vb, add Imports System.Reflection and Imports SolidWorksTools.File.

Why Did I Add These Namespaces?


2. In Windows Explorer, navigate to install_dir\samples\tutorial\api\addin.
3. Copy pm_extruded_block.bmp to your add-in project, in the same subdirectory where the other project bitmap files reside.
4. In Solution Explorer, right-click the project and select Add > Existing Item.
5. Select Image Files in the filter drop down list, select pm_extruded_block.bmp, and click Add.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 37 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

6. In Solution Explorer, right-click pm_extruded_block.bmp and select Properties.


7. In Properties, click the down-arrow button in the Build Action row and change Content to Embedded Resource.

8. Close Properties.

Adding Icons to Title Bar and Controls


Use the bitmap resource you just added to your project to add an icon to the title bar. Add standard SolidWorks icon labels to the controls of your
PropertyManager page.
1. In UserPMPage.vb, in CreatePage() declare and instantiate iBmp as a BitmapHandler and declare thisAssembly as an Assembly. Call
iBmp.CreateFileFromResourceBitmap() to create a runtime local file containing pm_extruded_block.bmp. Pass the local bitmap file to
swPropertyPage.SetTitleBitmap2().

2. In AddControls()after setting its selection filter, cast selection1 as a PropertyManagerPageControl and add standard SolidWorks bitmap label
swBitmapLabel_SelectEdge to the control.

3. In AddControls()after setting its display units, cast num1 to a PropertyManagerPageControl and add standard SolidWorks bitmap label
swBitmapLabel_LinearDistance to the control.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 38 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

4. Compile and run the add-in.


5. Show the Extrusion PMP PropertyManager page.
The icons appear at the SolidWorks standard distance to the left of their controls on the PropertyManager page. The title icon appears in the title bar.

6. Stop the debugger.

Changing Alignment of Controls


By default, the alignment of each control is left-aligned and stacked vertically on the page as each control is added to the page or group using
group.AddControl(). This is the best way to ensure a look and feel that emulates the SolidWorks PropertyManager pages. However, if you want to place
controls differently, like in a single row, you can cast each row control to PropertyManagerPageControl and use Top, Left, and Width properties to set its
size and location in the row relative to the group box boundaries:

Left edge is 0 dialog units.


Right edge is 100 dialog units.

Top edge is 0 dialog units.

Center the Redraw button using PropertyManagerPageControl.


1. In UserPMPage.vb in AddControls(), locate button1.
2. After group2.AddControl(), cast button1 to PropertyManagerPageControl and set its Left property to 25.

3. Compile and run the add-in.


4. Verify the change in the Extrusion PMP PropertyManager page.
5. Feel free to continue experimenting with controls alignment.
Congratulations! You have completed this tutorial.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

Custom PropertyManager Page Add-in Tutorial Overview

Page 39 of 39

NREVIOUS
P
EXT TOPIC
TOPIC
C# Overview
Installing
Using
Compiling
Designing
Expanding
Changing
Removing
Configuring
Modifying
Adding
the
Visual
Multiple
Icons
a Button
the
Titles
SolidWorks
Numberbox
Control
a
and
Unused
aSelection
Group
to
SolidWorks
Cues
Running
Tabs
and
Title
Control
Event
onBar
C#
Add-in
Location
API
VB.NET
the
PropertyManager
Startup
Groups
Controls
Handlers
and
Add-in
SDK
Numberbox
Button
Controls
Template
Add-in
and
of Controls
Control
Event
Template
Controls
Page

N
EXT TOPIC
Handlers
Event
Handlers
N
EXT TOPIC
Using
Removing
Configuring
Changing
the Alignment
SolidWorks
Unused
SelectionofC#
N
EXTNumberbox
TOPIC
Compiling
Designing
Expanding
Changing
Modifying
Adding
Visual
Multiple
a and
Button
Titles
Numberbox
a
and
a Group
Cues
Running
Tabs
and
Control
on
Add-in
and
Controls
Template
Event
Controls
Location
the
PropertyManager
Startup
Groups
and
Add-in
Button
ofControl
Controls
Control
Page
Handlers
Adding
Modifying
Icons
to Title
Event
Bar

Pand
REVIOUS
TOPIC
Event
Handlers
Handlers
Controls
VB.NET Overview

NEXT TOPIC
Using the SolidWorks
VB.NET Add-in Template

Return to the tutorials overview page.

file:///C:/Users/Nieve/AppData/Local/Temp/~hh1148.htm

02-05-2015

You might also like