Solid Edge FrameworkSupport Type Library
GetKeyPoint Method
Specifies the index of the keypoint/handle.
X coordinate of the specified keypoint.
Y coordinate of the specified keypoint.
Z coordinate of the specified keypoint.
Returns a member of the KeyPointType constant set.
Returns a value in the HandleType constant set.
Description
Returns information about a specified key point.
Syntax
Visual Basic
Public Sub GetKeyPoint( _
   ByVal Index As Long, _
   ByRef x As Double, _
   ByRef y As Double, _
   ByRef z As Double, _
   ByRef KeypointType As KeyPointType, _
   ByRef HandleType As Long _
) 
Parameters
Index
Specifies the index of the keypoint/handle.
x
X coordinate of the specified keypoint.
y
Y coordinate of the specified keypoint.
z
Z coordinate of the specified keypoint.
KeypointType
ValueDescription
igKeyPointCallbackKeypoint Type - Callback
igKeyPointCenterKeypoint Type - Center
igKeyPointEndKeypoint Type - End
igKeyPointHorizontalSilhouetteKeypoint Type - Horizontal Silhouette
igKeyPointInteriorNodeKeypoint Type - Interior Node
igKeyPointInteriorPoleKeypoint Type - Interior Pole
igKeyPointMajorAxisKeypoint Type - Major Axis
igKeyPointMiddleKeypoint Type - Middle
igKeyPointMinorAxisKeypoint Type - Minor Axis
igKeyPointNonDefiningKeypoint Type - Non-defining
igKeyPointPointOnlyKeypoint Type - Point Only
igKeyPointStartKeypoint Type - Start
igKeyPointVerticalSilhouetteKeypoint Type - Vertical Silhouette
Returns a member of the KeyPointType constant set.
HandleType
Returns a value in the HandleType constant set.
Remarks
The key point is specified by its index.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objCompStrns As SolidEdgeFrameworkSupport.ComplexStrings2d
    Dim objCompStrn1 As SolidEdgeFrameworkSupport.ComplexString2d
    Dim objL1 As SolidEdgeFrameworkSupport.Line2d
    Dim objL2 As SolidEdgeFrameworkSupport.Line2d
    Dim objL3 As SolidEdgeFrameworkSupport.Line2d
    Dim objBObjs(0 To 2) As Object
    Dim db1x As Double
    Dim db1y As Double
    Dim db1z As Double
    Dim lngIndex As Long
    Dim lngHandType As SolidEdgeConstants.HandleType
    Dim KPoint As SolidEdgeConstants.KeyPointType
    ' 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
    On Error GoTo 0
    'Get the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    'Create ComplexStrings2d collection object
    Set objCompStrns = objSheet.ComplexStrings2d
    'Draw few lines on the active sheet
    Set objL1 = objSheet.Lines2d.AddBy2Points(x1:=0.1, y1:=0.1, x2:=0.2, y2:=0.2)
    Set objL2 = objSheet.Lines2d.AddBy2Points(x1:=0.2, y1:=0.2, x2:=0.4, y2:=0.2)
    Set objL3 = objSheet.Lines2d.AddBy2Points(x1:=0.4, y1:=0.2, x2:=0.5, y2:=0.1)
    'Store the Objects in an Array
    Set objBObjs(0) = objL1
    Set objBObjs(1) = objL2
    Set objBObjs(2) = objL3
    'Create the ComplexString2d
    Set objCompStrn1 = objCompStrns.AddByObjects(ArraySize:=3, Members:=objBObjs())
    lngIndex = 0
    'Get the Key Point
    Call objCompStrn1.GetKeyPoint(Index:=lngIndex, x:=db1x, y:=db1y, z:=db1z, _
                                  KeyPointType:=KPoint, HandleType:=lngHandType)

    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objCompStrns = Nothing
    Set objCompStrn1 = Nothing
    Set objL1 = Nothing
    Set objL2 = Nothing
    Set objL3 = Nothing
    Set objBObjs(0) = Nothing
    Set objBObjs(1) = Nothing
    Set objBObjs(2) = Nothing
End Sub
See Also

ComplexString2d Object  | ComplexString2d Members

Send comments on this topic.