Solid Edge Assembly Type Library
Item Method
Variant (input) index.
Description
The items in a collection.
Syntax
Visual Basic
Public Function Item( _
   ByVal Index As Variant _
) As Object
Parameters
Index
Variant (input) index.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgeAssembly.AssemblyDocument
    Dim objRelations3d As SolidEdgeAssembly.Relations3d
    Dim objRItem As SolidEdgeAssembly.AxialRelation3d
    Const TESTFILE = "T:\vbtests\testcases\Sample.asm"
    ' 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.AssemblyDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    Call objDoc.Close
    ' opening an existing assembly document
    Set objDoc = objApp.Documents.Open(TESTFILE)
    ' getting the relations3d object from the assembly document
    Set objRelations3d = objDoc.Relations3d
    ' getting a particular item from the Relations3d collection object
    Set objRItem = objRelations3d.Item(2)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objRelations3d = Nothing
    Set objRItem = Nothing
End Sub
See Also

Relations3d Collection  | Relations3d Members

Send comments on this topic.