I'm writing a program in VBA that takes an XYZ table, draws lines in Solidworks, adds a radius and extrudes a circle over the path.
I've programmed everything, but I am running into an issue with sketch orientation.
I need to change which plane the profile circle is drawn on depending on the orientation of my path. Every time I try to use a Macro the sketch defaults to the front plane. Even when I record the Macro it will only draw the circles on the front plane. I've tried using 3D sketches as well, but that doesn't work.
Am I missing something?
Below is the macro I recorded. When I run it I get both circles on the front plane.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Set swApp = _
Set Part = swApp.ActiveDoc
Dim skSegment As Object
Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, -0.030076, -0.049493, 0#)
boolstatus = Part.Extension.SelectByID2("Right Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
Set skSegment = Part.SketchManager.CreateCircle(-0#, 0#, 0#, -0.125438, 0.0187, 0#)