Solid Edge FrameworkSupport Type Library
AddByTerminator Method
Specifies the object to which the terminal end of the leader connects.
Specifies the coordinates of the leader's start locate point. This point is used as a proximity point while calculating the key point. The z1 argument applies only to 3-D objects.
Specifies the coordinates of the leader's start locate point. This point is used as a proximity point while calculating the key point. The z1 argument applies only to 3-D objects.
Specifies the coordinates of the leader's start locate point. This point is used as a proximity point while calculating the key point. The z1 argument applies only to 3-D objects.
Specifies whether the object or a key point of the TerminatorObject is to be considered. If KeyPoint1 is True, the leader's terminal end is placed with respect to the TerminatorObject; if KeyPoint1 is False, the nearest key point on that object is selected.
Description
Creates a Leader or annotation object with a Leader.
Syntax
Visual Basic
Public Function AddByTerminator( _
   ByVal TerminatorObject As Object, _
   ByVal x1 As Double, _
   ByVal y1 As Double, _
   ByVal z1 As Double, _
   ByVal keyPoint1 As Boolean _
) As DatumFrame
Parameters
TerminatorObject
Specifies the object to which the terminal end of the leader connects.
x1
Specifies the coordinates of the leader's start locate point. This point is used as a proximity point while calculating the key point. The z1 argument applies only to 3-D objects.
y1
Specifies the coordinates of the leader's start locate point. This point is used as a proximity point while calculating the key point. The z1 argument applies only to 3-D objects.
z1
Specifies the coordinates of the leader's start locate point. This point is used as a proximity point while calculating the key point. The z1 argument applies only to 3-D objects.
keyPoint1
Specifies whether the object or a key point of the TerminatorObject is to be considered. If KeyPoint1 is True, the leader's terminal end is placed with respect to the TerminatorObject; if KeyPoint1 is False, the nearest key point on that object is selected.
Remarks
To create the annotation object with this method, specify the object to which the leader connects. As a result of this method, the annotation object is automatically positioned with respect to the object to which the leader connects.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objDatums As SolidEdgeFrameworkSupport.DatumFrames
    Dim objDtmFrm As SolidEdgeFrameworkSupport.DatumFrame
    Dim objLine 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.DraftDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'Get the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    ' Create a Line object
    Set objLine = objSheet.Lines2d.AddBy2Points(x1:=0.1, y1:=0.1, x2:=0.2, y2:=0.1)
    ' Create a DatumFrames collection object
    Set objDatums = objSheet.DatumFrames
    ' Add a DatumFrame object
    Set objDtmFrm = objDatums.AddByTerminator(TerminatorObject:=objLine, _
                                              x1:=0.15, y1:=0.1, z1:=0, keyPoint1:=False)
    objDtmFrm.Datum = "Test"
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objDatums = Nothing
    Set objDtmFrm = Nothing
    Set objLine = Nothing
End Sub
See Also

DatumFrames Collection  | DatumFrames Members