Ich bin mir nicht sicher, was der sgDIAMETER tun soll, aber es sieht aus wie ein reserviertes Wort ohne Wirkung für den Moment...
Vielleicht macht dieser Code jedoch das, was Sie möchten? :
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Dim myDisplayDim As Object
Set myDisplayDim = Part.AddDimension2(0, 0, 0)
Part.ClearSelection2 True
End Sub
Gold
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim myDisplayDim As Object
boolstatus = Part.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Set myDisplayDim = Part.AddDimension2(0, 0, 0)
boolstatus = Part.Extension.SelectByID2("Arc2", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Set myDisplayDim = Part.AddDimension2(0, 0, 0)
Part.ClearSelection2 True
End Sub