Solid Edge FrameworkSupport Type Library
AddAngle Method
The object for which the dimension is applied. The valid objects are Line2d or Arc2d.
Description
Creates a dimension to measure the angle of a line or an arc.
Syntax
Visual Basic
Public Function AddAngle( _
   ByVal Object As Object _
) As Dimension
Parameters
Object
The object for which the dimension is applied. The valid objects are Line2d or Arc2d.
Remarks
This method takes the minimum required data (object) and assumes other data from the defaults set in the collection object.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objProfile As SolidEdgePart.Profile
    Dim objD1 As SolidEdgeFrameworkSupport.Dimension
    Dim objA1 As SolidEdgeFrameworkSupport.Arc2d
    Dim sDumpStatus As String    ' Used for temporary storage of datadump return string
    ' 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 Profile
    Set objProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    ' Create an Arc
    Set objA1 = objProfile.Arcs2d.AddByCenterStartEnd(xCenter:=0, yCenter:=0, _
                                                      xStart:=0, yStart:=0.01, xEnd:=0.01, yEnd:=0)
    ' Creating a Dimension object
    Set objD1 = objProfile.Dimensions.AddAngle(Object:=objA1)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objProfile = Nothing
    Set objD1 = Nothing
    Set objA1 = Nothing
End Sub
See Also

Dimensions Collection  | Dimensions Members

Send comments on this topic.