Solid Edge FrameworkSupport Type Library
AddByStart Method
Specifies the object at which the centerline is to start.
Specifies the coordinates of the locate point of the StartObject. 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 locate point of the StartObject. 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 locate point of the StartObject. 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 StartObject or a key point of that object is to be considered for measuring. If KeyPoint is True, the element is selected for the dimension's start point; if KeyPoint is False, the nearest key point is selected.
Specifies the coordinates for the end of the centerline. The z2 argument applies only to 3-D objects.
Specifies the coordinates for the end of the centerline. The z2 argument applies only to 3-D objects.
Specifies the coordinates for the end of the centerline. The z2 argument applies only to 3-D objects.
Description
Creates a CenterLine object from a point that starts at a specified object and terminates at a specified coordinate.
Syntax
Visual Basic
Public Function AddByStart( _
   ByVal StartObject As Object, _
   ByVal x1 As Double, _
   ByVal y1 As Double, _
   ByVal z1 As Double, _
   ByVal keyPoint As Boolean, _
   ByVal x2 As Double, _
   ByVal y2 As Double, _
   ByVal z2 As Double _
) As CenterLine
Parameters
StartObject
Specifies the object at which the centerline is to start.
x1
Specifies the coordinates of the locate point of the StartObject. 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 locate point of the StartObject. 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 locate point of the StartObject. This point is used as a proximity point while calculating the key point. The z1 argument applies only to 3-D objects.
keyPoint
Specifies whether the StartObject or a key point of that object is to be considered for measuring. If KeyPoint is True, the element is selected for the dimension's start point; if KeyPoint is False, the nearest key point is selected.
x2
Specifies the coordinates for the end of the centerline. The z2 argument applies only to 3-D objects.
y2
Specifies the coordinates for the end of the centerline. The z2 argument applies only to 3-D objects.
z2
Specifies the coordinates for the end of the centerline. The z2 argument applies only to 3-D objects.
Remarks
The starting 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 Start point
    Call objCenterLines.AddByStart(StartObject:=objCircle, x1:=0.25, y1:=0.5, z1:=0, keyPoint:=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.