AnsweredAssumed Answered

How to get SKETCHPOINT name

Question asked by Yong Ning on Feb 9, 2017
Latest reply on Feb 13, 2017 by Karthikeyan Karamchandran

0.jpg

 

Record MACROS, Have sketchpoint  name, result is true

 

00.jpg

 

no sketchpoint name ,result is false

000.jpg

 

 

 

 

 

Private Sub deldel()

   Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

       Set SwApp = Application.SldWorks

       Set SwModel = SwApp.ActiveDoc

   Dim SwSelMgr As SelectionMgr

       Set SwSelMgr = SwModel.SelectionManager

       tmp = SwModel.Extension.SelectByID2("Point13", "SKETCHPOINT", 1.171609138888, 0.5654, 0, False, 0, Nothing, 0)

       Stop

       tmp = SwModel.Extension.SelectByID2("", "SKETCHPOINT", 1.171609138888, 0.5654, 0, False, 0, Nothing, 0)

         Stop

End Sub

 

******************************************************************************

Help me , follow code,

how to get sketchpoint name?

selectByID2→Select is True.

 

 

Private Sub ll() '

    Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

        Set SwApp = Application.SldWorks

        Set SwModel = SwApp.ActiveDoc

    Dim SwSelMgr As SelectionMgr

        Set SwSelMgr = SwModel.SelectionManager

    Dim SwPt As SketchPoint

        Set SwPt = SwSelMgr.GetSelectedObject5(1)

        With SwPt

            Debug.Print .X, .Y, .Z

        End With

    

End Sub

Outcomes