Solid Edge FrameworkSupport Type Library
GetElement Method
The object to which the DatumPoint is connected.
The coordinates of the center point of the referenced DatumPoint object.
The coordinates of the center point of the referenced DatumPoint object.
The coordinates of the center point of the referenced DatumPoint object.
Returns True if the DatumPoint was placed with respect to the object. Returns False if the DatumPoint was placed with respect to a key point.
Description
Returns the element for the referenced DatumPoint object.
Syntax
Visual Basic
Public Sub GetElement( _
   ByRef CenterObj As Object, _
   ByRef x As Double, _
   ByRef y As Double, _
   ByRef z As Double, _
   ByRef keyPoint As Boolean _
) 
Parameters
CenterObj
The object to which the DatumPoint is connected.
x
The coordinates of the center point of the referenced DatumPoint object.
y
The coordinates of the center point of the referenced DatumPoint object.
z
The coordinates of the center point of the referenced DatumPoint object.
keyPoint
Returns True if the DatumPoint was placed with respect to the object. Returns False if the DatumPoint was placed with respect to a key point.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As solidedgedraft.DraftDocument
    Dim objSheet As solidedgedraft.Sheet
    Dim objDatumPoints As SolidEdgeFrameworkSupport.DatumPoints
    Dim objdatumPoint As SolidEdgeFrameworkSupport.DatumPoint
    Dim objCircle As SolidEdgeFrameworkSupport.Circle2d
    Dim objCenterObj As SolidEdgeFrameworkSupport.Circle2d
    Dim dblX As Double, dblY As Double, dblZ As Double
    Dim bKeyPoint As Boolean

    ' 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
    'Get the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    'create a collection of datumpoint.
    Set objDatumPoints = objSheet.DatumPoints
    'draw a circle
    Set objCircle = objSheet.Circles2d.AddByCenterRadius(x:=0.2, _
                                                         y:=0.2, Radius:=0.05)
    'add a datumpoint to collection
    Set objdatumPoint = objDatumPoints.AddByElement(terminatorobject:= _
                                                    objCircle, x1:=0.2, y1:=0.2, z1:=0, keypoint1:=True)
    'call getelement
    Call objdatumPoint.GetElement(CenterObj:=objCenterObj, x:=dblX, _
                                  y:=dblY, z:=dblZ, Keypoint:=bKeyPoint)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objDatumPoints = Nothing
    Set objdatumPoint = Nothing
    Set objCircle = Nothing
    Set objCenterObj = Nothing
End Sub
See Also

DatumPoint Object  | DatumPoint Members

Send comments on this topic.