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
Ned
Didn't find your answer? Ask the community — no account required.
P
Paul Delhanty
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
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.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.