3 Replies Latest reply on Dec 24, 2013 11:03 AM by Mohammed Elkalakhi

    Type of selected origin point

    Mohammed Elkalakhi

      Hello everybody,


      I select the origin point of an assembly,


      I get the selected object,


      But I can't determine the type of this selected object


      I tried SketchPoint but it seem that it is not,


      Can any body tell me what is the type of selected origin point ?



        • Re: Type of selected origin point
          Robert D.

          Can you upload the file here so we can see what your talking about?

          • Re: Type of selected origin point
            Wayne Matus

            If you record a macro, it is "EXTSKETCHPOINT".

            • Re: Type of selected origin point
              Mohammed Elkalakhi

              In fact I have a selection box with a filter :


              Dim filters(filtreCount) As swSelectType_e

              filters(index) = swSelectType_e.swSelEXTSKETCHSEGS

              filters(index + 1) = swSelectType_e.swSelEDGES

              filters(index + 2) = swSelectType_e.swSelDATUMAXES

              filters(index + 3) = swSelectType_e.swSelSKETCHES




              When I select the origin point,


              In the OnSubmitSelection event I noted that the selType is swSelectType_e.swSelSKETCHES


              So I wanted to get the selected object and test if it'is an origin point,


              And I did this


              Public Function OnSubmitSelection(ByVal Id As Integer, ByVal selection As Object, ByVal selType As Integer, ByRef itemText As String) As Boolean Implements SolidWorks.Interop.swpublished.IPropertyManagerPage2Handler9.OnSubmitSelection


                      Dim isOriginPoint As Boolean


                      OnSubmitSelection = True


                      isOriginPoint = TypeOf selection Is Feature AndAlso "OriginProfileFeature" = selection.GetTypeName()

                      If isOriginPoint Then OnSubmitSelection = False


              End Function


              Thank you very much