Table of Contents

Class PmpUiModel

Namespace
Hymma.Solidworks.Addins
Assembly
Hymma.Solidworks.Addins.dll

a wrapper for solidworks property manager page UI

public class PmpUiModel : IWrapSolidworksObject<IPropertyManagerPage2>, IReleaseSolidworksObject
Inheritance
PmpUiModel
Implements
IWrapSolidworksObject<IPropertyManagerPage2>
Derived
Inherited Members

Constructors

PmpUiModel(ISldWorks, string)

base class for making property manager page UI models and controls

public PmpUiModel(ISldWorks solidworks, string title)

Parameters

solidworks ISldWorks
title string

the title of the property manager page that appears on top of it in solidWORK

Remarks

the title of the property manger page has to be a unique value for each add-in

Properties

AllControls

get a flattened list of all controls hosted by this UI model

public List<IPmpControl> AllControls { get; }

Property Value

List<IPmpControl>

AllGroups

get a flattened list of all groups hosted by this UI model

public List<PmpGroup> AllGroups { get; }

Property Value

List<PmpGroup>

IconDir

directory where the icons are stored on the hard drive

public DirectoryInfo IconDir { get; }

Property Value

DirectoryInfo

Options

bitwise option as defined in PmpOptions default has okay, cancel, push-pin buttons and page build is disabled during handlers

public PmpOptions Options { get; set; }

Property Value

PmpOptions

PmpGroups

solidworks group boxes that contain solidworks pmp controllers

public List<PmpGroup> PmpGroups { get; }

Property Value

List<PmpGroup>

PmpTabs

solidworks property manager tabs that in turn can contain other group boxes and controls

public List<PmpTab> PmpTabs { get; set; }

Property Value

List<PmpTab>

PopUpMenuItems

a list of pop up menu items (right mouse button click menu items)

public List<PopUpMenuItem> PopUpMenuItems { get; set; }

Property Value

List<PopUpMenuItem>

Solidworks

solidworks object

public ISldWorks Solidworks { get; set; }

Property Value

ISldWorks

SolidworksObject

gets native solidworks object

public IPropertyManagerPage2 SolidworksObject { get; set; }

Property Value

IPropertyManagerPage2

Title

a title for this property manager page

public string Title { get; set; }

Property Value

string

Methods

GetControl(int)

return a specific control type based on its id

public IPmpControl GetControl(int id)

Parameters

id int

id of control to return

Returns

IPmpControl

GetControls<T>()

get all controls of type T in this proper manger page

public IEnumerable<T> GetControls<T>() where T : IPmpControl

Returns

IEnumerable<T>

Type Parameters

T

type of control to return

ReleaseSolidworksObject()

release solidworks object

public void ReleaseSolidworksObject()

SetCursor(PmpCursorStyles)

Sets the cursor after a selection is made in the SOLIDWORKS graphics area.

public void SetCursor(PmpCursorStyles styles)

Parameters

styles PmpCursorStyles

SetMessage(string, string, swPropertyManagerPageMessageVisibility, swPropertyManagerPageMessageExpanded)

Sets the message in this PropertyManager page.

public void SetMessage(string caption, string message, swPropertyManagerPageMessageVisibility messageVisibility, swPropertyManagerPageMessageExpanded pageMessageExpanded)

Parameters

caption string
message string
messageVisibility swPropertyManagerPageMessageVisibility
pageMessageExpanded swPropertyManagerPageMessageExpanded

Remarks

This method should be useful when creating multi-page PropertyManager pages where you want different informational messages on each page.

SetTitleIcon(Bitmap)

The recommended size for bitmaps is a square from 18- to 22-cells wide.

public void SetTitleIcon(Bitmap bitmap)

Parameters

bitmap Bitmap

Remarks

The recommended size for bitmaps is a square from 18- to 22-cells wide. However, the bitmap can be any size, as long as it fits on the title bar. The bitmap appears transparent by mapping any white(RGB(255,255,255)) cells to the current PropertyManager page title bar background color.Remember the special use of this color as you design your bitmap.

Events

AfterActivation

method to invoke after the property manager page is activated

public event EventHandler<EventArgs> AfterActivation

Event Type

EventHandler<EventArgs>

AfterClose

method to invoke after the property manager page is closed

public event EventHandler<PmpCloseEventArgs> AfterClose

Event Type

EventHandler<PmpCloseEventArgs>

Closing

method to invoke while the property manager page is closing

public event EventHandler<PmpCloseEventArgs> Closing

Event Type

EventHandler<PmpCloseEventArgs>

HelpClicked

method to invoke once user clicked on question mark button on property manager page

public event EventHandler<bool> HelpClicked

Event Type

EventHandler<bool>

KeyStroke

Processes a keystroke that occurred on this PropertyManager page

public event EventHandler<PmpKeyStrokeEventArgs> KeyStroke

Event Type

EventHandler<PmpKeyStrokeEventArgs>

Remarks

Options should have the HandleKeystrokes for this action to work

NextPageClicked

method to invoke when user goes to next page of a property manager page

public event EventHandler<bool> NextPageClicked

Event Type

EventHandler<bool>

Preview

method to invoke when user previews the results

public event EventHandler<bool> Preview

Event Type

EventHandler<bool>

PreviousPageClicked

method to invoke when user goes to the previous page of a property manager page

public event EventHandler<bool> PreviousPageClicked

Event Type

EventHandler<bool>

RedoClicked

method to invoke when user Re-do something (ctrl+y)

public event EventHandler<EventArgs> RedoClicked

Event Type

EventHandler<EventArgs>

Registering

fired once your addin is loaded or when solidworks starts up

public event EventHandler<EventArgs> Registering

Event Type

EventHandler<EventArgs>

TabClicked

method to invoke when user clicks on a tab

public event EventHandler<PmpTabClickedEventArgs> TabClicked

Event Type

EventHandler<PmpTabClickedEventArgs>

UndoClicked

method to invoke when user calls undo (ctrl+z)

public event EventHandler<EventArgs> UndoClicked

Event Type

EventHandler<EventArgs>

WhatsNewClicked

method to invoke when user selects on Whet's new button

public event EventHandler<EventArgs> WhatsNewClicked

Event Type

EventHandler<EventArgs>