AnsweredAssumed Answered

get -> Sketch point name?? (怎么得到草图点的点名称?)

Question asked by Goggoo Goggoo on Dec 22, 2014
Latest reply on Dec 22, 2014 by Goggoo Goggoo

VB.net Code:

        Part.Extension.SelectByID2("Sketch1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0)

        Part.EditSketch()

        Part.Extension.SelectAll()

        swSelMgr = Part.SelectionManager

        Dim SwObj As Object

        Dim SwPoint As SldWorks.SketchPoint

        On Error Resume Next

        For k = 1 To swSelMgr.GetSelectedObjectCount2(-1)

            SwObj = swSelMgr.GetSelectedObject6(k, -1)

            If Not SwObj Is Nothing Then

                SwPoint = SwObj

                If Not SwPoint Is Nothing Then

                 print (SwPoint.name)

                  'How to get the point name ; Ex:Point1,Point2........ ?????????

                  (怎么得到点的名称,如 point1,pint2;我试用SwPoint.name是不支持的)

                End If

            End If

        Next

Outcomes