I am trying to select a plane of a created coordinate system and then normal to it. It only works manually doing it, but not using API! ![]()
Appreciate any help!
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("Coordinate System1\YZ Plane", "COORDSYS", 0, 0, 0, False, 0, Nothing, 0)
swApp.RunCommand swCommands_NormalTo, ""
Part.ClearSelection2 True
End Sub