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 objline As SolidEdgeFrameworkSupport.Line2d
    Dim objdims As SolidEdgeFrameworkSupport.Dimensions
    Dim objDimension As SolidEdgeFrameworkSupport.Dimension
    Dim dblx As Double, dbly As Double, dblz As Double
    Dim cKeyPoint As SolidEdgeConstants.KeyPointType
    Dim lngHandle As SolidEdgeConstants.HandleType
    ' 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 an line2d
    Set objline = objSheet.Lines2d.AddBy2Points(0.1, 0.1, 0.3, 0.1)
    'create Dimension collection
    Set objdims = objSheet.Dimensions
    'create an coordinate dimension origin
    Set objDimension = objdims.AddCoordinateOrigin(Object:=objline, _
                                                   x:=0.1, y:=0.1, z:=0, KeyPoint:=True)
    'get keypoint
    Call objDimension.GetKeyPoint(Index:=0, x:=dblx, y:=dbly, z:=dblz, _
                                  KeyPointType:=cKeyPoint, HandleType:=lngHandle)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objdims = Nothing
    Set objDimension = Nothing
    Set objline = Nothing
End Sub
See Also

Dimension Object  | Dimension Members