Solid Edge FrameworkSupport Type Library
AddByEnd Method
Specifies the object at which the centerline terminates.
Specifies the coordinates of the end object's locate point. This point is used as a proximity point while calculating the key point. The z1 arguments is only specified for 3-D objects.
Specifies the coordinates of the end object's locate point. This point is used as a proximity point while calculating the key point. The z1 arguments is only specified for 3-D objects.
Specifies the coordinates of the end object's locate point. This point is used as a proximity point while calculating the key point. The z1 arguments is only specified for 3-D objects.
Specifies whether the object or a key point of the object is to be considered for measuring. If True, the element is selected for the centerline's end point; if False, the nearest key point is selected.
Specifies the coordinates for the start point of the centerline. The z2 argument is only specified for 3-D objects.
Specifies the coordinates for the start point of the centerline. The z2 argument is only specified for 3-D objects.
Specifies the coordinates for the start point of the centerline. The z2 argument is only specified for 3-D objects.
Description
Creates a CenterLine object from a specified point terminating at a specified object.
Syntax
Visual Basic
Public Function AddByEnd( _
   ByVal EndObject 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 CenterLine
Parameters
EndObject
Specifies the object at which the centerline terminates.
x1
Specifies the coordinates of the end object's locate point. This point is used as a proximity point while calculating the key point. The z1 arguments is only specified for 3-D objects.
y1
Specifies the coordinates of the end object's locate point. This point is used as a proximity point while calculating the key point. The z1 arguments is only specified for 3-D objects.
z1
Specifies the coordinates of the end object's locate point. This point is used as a proximity point while calculating the key point. The z1 arguments is only specified for 3-D objects.
keyPoint1
Specifies whether the object or a key point of the object is to be considered for measuring. If True, the element is selected for the centerline's end point; if False, the nearest key point is selected.
x2
Specifies the coordinates for the start point of the centerline. The z2 argument is only specified for 3-D objects.
y2
Specifies the coordinates for the start point of the centerline. The z2 argument is only specified for 3-D objects.
z2
Specifies the coordinates for the start point of the centerline. The z2 argument is only specified for 3-D objects.
Remarks
The terminating point can be an element or a key point on that element. If the CenterLine object is placed with respect to a key point, the point of reference is the key point.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objCenterLines As SolidEdgeFrameworkSupport.CenterLines
    Dim objCircle As SolidEdgeFrameworkSupport.Circle2d
    ' 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
    ' drawing a circle on the active sheet
    Set objCircle = objDoc.ActiveSheet.Circles2d.AddByCenterRadius(x:=0.25, y:=0.25, Radius:=0.05)
    ' getting the CenterLines object on the active sheet
    Set objCenterLines = objDoc.ActiveSheet.CenterLines
    ' drawing a center line on the active sheet using the nearest KeyPoint on the Circle object as reference for the End point
    Call objCenterLines.AddByEnd(EndObject:=objCircle, x1:=0.25, y1:=0.5, z1:=0, keyPoint1:=False, _
                                 x2:=0.1, y2:=0.1, z2:=0)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objCenterLines = Nothing
    Set objCircle = Nothing
End Sub
See Also

CenterLines Collection  | CenterLines Members

Send comments on this topic.