include Push-Pin on prop. manager page API

Can someone give me an example of how to include the push-pin in a
property manager page. The help file gives me this information. I
have downloaded a sample property manager page from the Solidworks
website but I am not sure where to insert the code.
I defined Pinned as Boolean and set it to True, but I get the error
that PropertyManagerPage2 is not a defined variable.
The solidworks help file shows the following syntax, but does not
include an example.
Syntax (OLE Automation)
Pinned = PropertyManagerPage2.Pinned (VB Get property)
PropertyManagerPage2.Pinned = Pinned (VB Set property)
Thank you
Reply to
Loading thread data ...
To get the push-pin to appear you need to include swPropertyManagerOptions_PushpinButton as one of the bitmap values passed as the second argument to CreatePropertyManagerPage:
(1) To get the definition of swPropertyManagerOptions_PushpinButton you could add the following enum to the swConst
Public Enum swPropertyManagerButtonTypes_e swPropertyManagerOptions_OkayButton = &H1 swPropertyManagerOptions_CancelButton = &H2 swPropertyManagerOptions_LockedPage = &H4 swPropertyManagerOptions_CloseDialogButton = &H8 swPropertyManagerOptions_MultiplePages = &H10 swPropertyManagerOptions_PushpinButton = &H20 End Enum
Alternatively, as you need SW2004 for API pushpins anyway, in the Reference dialog box on the Tools menu in the VB editor search for check box labelled Solidworks Constant type library and make sure it is checked. That will give your macro access to the definitions from swconst.tlb. Then you can dump the file swConst from the sample.
(2) Then edit the code in PropMgr
'Set some variables for the Page title = "Sample PropertyManager" buttonTypes = swPropertyManagerOptions_OkayButton + swPropertyManagerOptions_CancelButton + swPropertyManagerOptions_PushpinButton
'Create the PropertyManagerPage Set m_Page = swApp.CreatePropertyManagerPage(title, buttonTypes, pageHdlr, errors)
The property Pinned controls whether the pin is pushed in or out once you get it to appear.
Reply to
Paul Delhanty

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.