Hello,

I would like to determine if a circle in a 2D sketch is horizontal or not (or in other words, if its sketch is on a plane parallel to the top plane or not). However no matter how the sketch is oriented, the normal vector returned from the arc/circle is the same. Here is what I'm doing:

Sub main()

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set swSelMgr = swModel.SelectionManager

Set arc = swSelMgr.GetSelectedObject6(1, -1)

vector = arc.GetNormalVector

Debug.Print vector(0)

Debug.Print vector(1)

Debug.Print vector(2)

End Sub

I select an arc or a circle and run the macro. For an arc, it returns (-0,-0,-1), for a circle it returns (0,0,1).

Anyone knows how to get the correct vector?

Thanks in advance!

It's being reported in the sketch's coordinate system. You need to transform to model coordinates using ModelToSketchTransform (I think that's it).