Solid Edge Framework Type Library
ActiveEnvironment Property
Description
Returns the environment that belongs to the current active window of the document.
Property type
Read-only property
Syntax
Visual Basic
Public Property ActiveEnvironment As String
Remarks
An environment is a collection of menu bars, toolbars, and keyboard accelerators defined for a specific workflow in an application.
Example
Imports SolidEdgeFramework
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim strActiveEnvironment As String

        Try
            OleMessageFilter.Register()

            ' Connect to a running instance of Solid Edge.
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            strActiveEnvironment = objApplication.ActiveEnvironment
        Catch ex As Exception
            ' Write any errors to console.
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

Application Object  | Application Members