Solid Edge Framework Type Library
Index Property
Description
Returns the numeric index for the active object.
Property type
Read-only property
Syntax
Visual Basic
Public Property Index As Integer
Remarks
This index is the sequence that the object holds in its collection object (as held by the parent).
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objEnvironments As SolidEdgeFramework.Environments
    Dim objEnvironment As SolidEdgeFramework.Environment
    Dim lngIndex As Long
    ' 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.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'Get the Environments collection
    Set objEnvironments = objApp.Environments
    'Get the Part environment i.e., 9th item in the Environments collection
    Set objEnvironment = objEnvironments(9)
    'Get a reference to the Commandbars collection object
    lngIndex = objEnvironment.Index
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objEnvironment = Nothing
    Set objEnvironments = Nothing
End Sub
See Also

Environment Object  | Environment Members

Send comments on this topic.