Solid Edge Framework Type Library > View Object : GetRotationFocus Method |
Visual Basic |
---|
Public Sub GetRotationFocus( _ ByRef pdPointX As Double, _ ByRef pdPointY As Double, _ ByRef pdPointZ As Double, _ ByRef pdDirectionX As Double, _ ByRef pdDirectionZ As Double, _ ByRef pdDirectionY As Double, _ ByRef pdFront As Double, _ ByRef pdBack As Double, _ ByRef pdRadius As Double, _ ByRef puOptions As Long _ ) |
There is no such enumeration of rotation focus options flags. The options are internally declared and it is not possible to expose the settings for general consumption. A non-zero, negative value should be sufficient indication that a rotation focus is set and the following states can be used to determine the type of rotation:
1. Zero radius and/or null direction vector = “free rotation about a point”.
2. Non-null direction vector = “constraint rotation about an axis
Private Sub GetRotationFocus_Click(sender As Object, e As EventArgs) Handles GetRotationFocus.Click Dim objApplication As SolidEdgeFramework.Application = Nothing Dim objView As SolidEdgeFramework.View = Nothing Dim objCurWindow As SolidEdgeFramework.Window Dim objX, objY, objZ As Double Dim objNX, objNY, objNZ As Double Dim objFr, objBk, objRad As Double Dim objOpt As Integer Try objApplication = Marshal.GetActiveObject("SolidEdge.Application") objCurWindow = objApplication.ActiveWindow objView = objCurWindow.View 'Get the Rotation focus parameters. objView.GetRotationFocus(objX, objY, objZ, objNX, objNY, objNZ, objFr, objBk, objRad, objOpt) MsgBox("Result of GetRotationFocus" + vbNewLine + objX.ToString + " " + objY.ToString + " " + objZ.ToString + " " + objNX.ToString + " " + objNY.ToString + " " + objNZ.ToString + " " + objFr.ToString + " " + objRad.ToString + " " + objOpt.ToString) Catch ex As Exception MsgBox(ex.ToString) End Try End Sub