Solid Edge FrameworkSupport Type Library
AddByPointAngleLength Method
Specifies the coordinates of the start point of the new line.
Specifies the coordinates of the start point of the new line.
Specifies the angle of the new line.
Specifies the length of the new line.
Description
Creates a Line2d object by specifying a start point, an angle, and a length.
Syntax
Visual Basic
Public Function AddByPointAngleLength( _
   ByVal x As Double, _
   ByVal y As Double, _
   ByVal Angle As Double, _
   ByVal Length As Double _
) As Line2d
Parameters
x
Specifies the coordinates of the start point of the new line.
y
Specifies the coordinates of the start point of the new line.
Angle
Specifies the angle of the new line.
Length
Specifies the length of the new line.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objLines As SolidEdgeFrameworkSupport.Lines2d
    Dim objLine1 As SolidEdgeFrameworkSupport.Line2d
    ' 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.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'Create an empty Lines2d collection object
    Set objLines = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:= _
                                                       objDoc.RefPlanes(1)).Lines2d
    ' Create a Line2d object
    Set objLine1 = objLines.AddByPointAngleLength(x:=0, y:=0, Angle:=45 * PI / 180, Length:=0.01)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objLines = Nothing
    Set objLine1 = Nothing
End Sub
See Also

Lines2d Collection  | Lines2d Members

Send comments on this topic.