AnsweredAssumed Answered

Within a Property Manager Page, why does "Get Focus" cause my filters to go bad?

Question asked by Danny Bradford on Mar 29, 2016
Latest reply on Mar 30, 2016 by Danny Bradford

Greetings all,

I am almost finished with my new Solidworks function but have a nagging problem I have yet to resolve. The sum of it is that when I add functionality to change the focus of the Property Manager Page from one selection box to the next the filters do not seem to work correctly.

 

Change focus code is here. I comment this out and filters works correctly: (Within OnSubmitSelection)

 

        If pm_Selection.GetSelectionFocus Then

            pm_Selection2.SetSelectionFocus()

 

        ElseIf pm_Selection2.GetSelectionFocus Then

            pm_Selection3.SetSelectionFocus()

 

        ElseIf pm_Selection3.GetSelectionFocus Then

            pmButton1.SetSelectionFocus()

 

My Filter code that goes batty when using the Focus code: (Within New)

            Dim filters(3) As swSelectType_e

 

            filters(0) = swSelectType_e.swSelEDGES

            filters(1) = swSelectType_e.swSelREFEDGES

            filters(2) = swSelectType_e.swSelREFCURVES

            filters(3) = swSelectType_e.swSelREFERENCECURVES

 

            Dim filters2(0) As swSelectType_e

            filters2(0) = swSelectType_e.swSelFACES

 

Code to leverage the Filter within one of the selection boxes: (Also within New)

 

            pm_Selection2.SingleEntityOnly = True

            pm_Selection2.SetCalloutLabel("Short Edge")

            pm_Selection2.AllowMultipleSelectOfSameEntity = False

            pm_Selection2.Height = 12

            pm_Selection2.SetSelectionFilters(filters)

 

            pm_Selection3.SingleEntityOnly = True

            pm_Selection3.SetCalloutLabel("Mating Panel Face")

            pm_Selection3.AllowMultipleSelectOfSameEntity = False

            pm_Selection3.Height = 12

            pm_Selection3.SetSelectionFilters(filters2)

 

Does anyone have any ideas on how to fix this or change direction to make it all work?

 

I am working within VB.NET and Soldiworks 2015 SP02

 

Many thanks for your time.

Outcomes