2 Replies Latest reply on Mar 30, 2016 11:16 AM by Danny Bradford

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

    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



              ElseIf pm_Selection2.GetSelectionFocus Then



              ElseIf pm_Selection3.GetSelectionFocus Then



      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_Selection3.SingleEntityOnly = True

                  pm_Selection3.SetCalloutLabel("Mating Panel Face")

                  pm_Selection3.AllowMultipleSelectOfSameEntity = False

                  pm_Selection3.Height = 12



      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.