3 Replies Latest reply on Mar 24, 2014 10:10 PM by Allen Liu

    AddIn Sketch point issue

    Allen Liu

      I am a newbie for solidworks add-in developing.  how to can select sketch piont in active doc.

      but I try any more method. It's awalys fail. so I only throw my issue. To Hope everybody can give me a hand.

      thanks a lot.

       

      //Snippet code..

      ======================================

        selection1 = (IPropertyManagerPageSelectionbox)group2.AddControl(selection1ID, controlType, "Sample Selection", align, options, "Displays features selected in main view");

                  if (selection1 != null)

                  {

                      //int[] filter = { (int)swSelectType_e.swSelEDGES, (int)swSelectType_e.swSelVERTICES };

                      System.Diagnostics.Debug.WriteLine("Sketch Point..");

                      int[] filter = { (int)swSelectType_e.swSelSKETCHPOINTS, (int)swSelectType_e.swSelDATUMPOINTS }; //why can not select any sketch pionts from active document?

                     // int[] filter = { (int)swSelectType_e.swSelDIMENSIONS, (int)swSelectType_e.swSelEDGES };

                      selection1.Height = 40;

                      selection1.SetSelectionFilters(filter);

                  }

       

      =========================