Solid Edge FrameworkSupport Type Library
Rotate Method
Description
Rotates the referenced object about the point specified by the angle in radians.
Syntax
Visual Basic
Public Sub Rotate( _
   ByVal Angle As Double, _
   ByVal x As Double, _
   ByVal y As Double _
) 
Parameters
Angle
x
y
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objCurves As SolidEdgeFrameworkSupport.Curves2d
    Dim objCurve1 As SolidEdgeFrameworkSupport.Curve2d
    Dim dblPoint(1 To 8) As Double
    Dim dblX As Double, dblY As Double, dblZ As Double
    Dim lngkeypointtype As SolidEdgeConstants.KeyPointType
    Dim lnghandletype As SolidEdgeConstants.HandleType

    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.DraftDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'getting the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    'create Curves collection
    Set objCurves = objSheet.Curves2d
    'Define points
    dblPoint(1) = 0.15
    dblPoint(2) = 0.15
    dblPoint(3) = 0.25
    dblPoint(4) = 0.15
    dblPoint(5) = 0.25
    dblPoint(6) = 0.25
    dblPoint(7) = 0.15
    dblPoint(8) = 0.25
    'Create curve
    Set objCurve1 = objCurves.AddByPoints(Pointcount:=4, Points:=dblPoint, FitType:=igDirectFit, Closed:=False)
    'rotate curve
    Call objCurve1.Rotate(Angle:=PI / 2, x:=0.25, y:=0.25)





    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objCurves = Nothing
    Set objCurve1 = Nothing
End Sub
See Also

Curve2d Object  | Curve2d Members

Send comments on this topic.