Solid Edge FrameworkSupport Type Library
Item Method
Variant (input) index.
Description
The items in a collection.
Syntax
Visual Basic
Public Function Item( _
   ByVal Index As Variant _
) As DatumFrame
Parameters
Index
Variant (input) index.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objDatums As SolidEdgeFrameworkSupport.DatumFrames
    Dim objDtmFrm1 As SolidEdgeFrameworkSupport.DatumFrame
    Dim objDtmFrm2 As SolidEdgeFrameworkSupport.DatumFrame
    ' 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 DatumFrames collection object
    Set objDatums = objSheet.DatumFrames
    ' Add a DatumFrame object
    Set objDtmFrm1 = objDatums.Add(x1:=0.1, y1:=0.1, z1:=0)
    ' Assign the Text to the DatumFrame
    objDtmFrm1.Datum = "Test"
    ' Assign the DatumFrame object created to another object
    Set objDtmFrm2 = objDatums.Item(Index:=1)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objDatums = Nothing
    Set objDtmFrm1 = Nothing
    Set objDtmFrm2 = Nothing
End Sub
See Also

DatumFrames Collection  | DatumFrames Members