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
solidworksISldWorkstitlestringthe 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
AllGroups
get a flattened list of all groups hosted by this UI model
public List<PmpGroup> AllGroups { get; }
Property Value
IconDir
directory where the icons are stored on the hard drive
public DirectoryInfo IconDir { get; }
Property Value
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
PmpGroups
solidworks group boxes that contain solidworks pmp controllers
public List<PmpGroup> PmpGroups { get; }
Property Value
PmpTabs
solidworks property manager tabs that in turn can contain other group boxes and controls
public List<PmpTab> PmpTabs { get; set; }
Property Value
PopUpMenuItems
a list of pop up menu items (right mouse button click menu items)
public List<PopUpMenuItem> PopUpMenuItems { get; set; }
Property Value
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
Methods
GetControl(int)
return a specific control type based on its id
public IPmpControl GetControl(int id)
Parameters
idintid of control to return
Returns
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
Ttype 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
stylesPmpCursorStyles
SetMessage(string, string, swPropertyManagerPageMessageVisibility, swPropertyManagerPageMessageExpanded)
Sets the message in this PropertyManager page.
public void SetMessage(string caption, string message, swPropertyManagerPageMessageVisibility messageVisibility, swPropertyManagerPageMessageExpanded pageMessageExpanded)
Parameters
captionstringmessagestringmessageVisibilityswPropertyManagerPageMessageVisibilitypageMessageExpandedswPropertyManagerPageMessageExpanded
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
bitmapBitmap
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
AfterClose
method to invoke after the property manager page is closed
public event EventHandler<PmpCloseEventArgs> AfterClose
Event Type
Closing
method to invoke while the property manager page is closing
public event EventHandler<PmpCloseEventArgs> Closing
Event Type
HelpClicked
method to invoke once user clicked on question mark button on property manager page
public event EventHandler<bool> HelpClicked
Event Type
KeyStroke
Processes a keystroke that occurred on this PropertyManager page
public event EventHandler<PmpKeyStrokeEventArgs> KeyStroke
Event Type
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
Preview
method to invoke when user previews the results
public event EventHandler<bool> Preview
Event Type
PreviousPageClicked
method to invoke when user goes to the previous page of a property manager page
public event EventHandler<bool> PreviousPageClicked
Event Type
RedoClicked
method to invoke when user Re-do something (ctrl+y)
public event EventHandler<EventArgs> RedoClicked
Event Type
Registering
fired once your addin is loaded or when solidworks starts up
public event EventHandler<EventArgs> Registering
Event Type
TabClicked
method to invoke when user clicks on a tab
public event EventHandler<PmpTabClickedEventArgs> TabClicked
Event Type
UndoClicked
method to invoke when user calls undo (ctrl+z)
public event EventHandler<EventArgs> UndoClicked
Event Type
WhatsNewClicked
method to invoke when user selects on Whet's new button
public event EventHandler<EventArgs> WhatsNewClicked