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.
Specifies the coordinates of the leader's end locate point. This point is used as a proximity point while calculating the key point. The z2 argument applies only to 3-D objects.
Specifies the coordinates of the leader's end locate point. This point is used as a proximity point while calculating the key point. The z2 argument applies only to 3-D objects.
Specifies the coordinates of the leader's end locate point. This point is used as a proximity point while calculating the key point. The z2 argument applies only to 3-D objects.
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, _
   ByVal x2 As Double, _
   ByVal y2 As Double, _
   ByVal z2 As Double _
) As Leader
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.
x2
Specifies the coordinates of the leader's end locate point. This point is used as a proximity point while calculating the key point. The z2 argument applies only to 3-D objects.
y2
Specifies the coordinates of the leader's end locate point. This point is used as a proximity point while calculating the key point. The z2 argument applies only to 3-D objects.
z2
Specifies the coordinates of the leader's end locate point. This point is used as a proximity point while calculating the key point. The z2 argument applies only to 3-D objects.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objTextBox As SolidEdgeFrameworkSupport.TextBox
    Dim objLeaders As SolidEdgeFrameworkSupport.Leaders
    ' 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 a text Box in the active sheet.
    Set objTextBox = objSheet.TextBoxes.AddByHtWdAng(x1:=0.1, y1:=0.1, z1:=0, ht:=0.1, wd:=0.15, ang:=0)
    'Add some text to the Text
    objTextBox.Text = "THIS IS FOR TESTING ONLY"
    'Create Leaders collection object
    Set objLeaders = objSheet.Leaders
    'Create a leader attatched to text box
    Call objLeaders.AddByTerminator(TerminatorObject:=objTextBox, x1:=0.125, _
                                    y1:=0.2, z1:=0, Keypoint1:=True, _
                                    x2:=0.2, y2:=0.4, z2:=0)

    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objTextBox = Nothing
    Set objLeaders = Nothing
End Sub
See Also

Leaders Collection  | Leaders Members