Share

Environment Object


Description

The Environment object represents any Autodesk Inventor environment. Example environments are Part, Assembly, Sketch, etc. The Environment represents the current state of an environment. See the UI customization and Environments overviews for more information.

Methods

Name Description
Delete Method that deletes the environment. This method will fail for built-in environments.
GetRadialMarkingMenu Returns the RadialMarkingMenu object that can be used to query and set the commands available in the radial menu for the input object type.

Properties

Name Description
AdditionalVisibleRibbonTabs Gets and sets an array of strings containing the internal names of ribbon tabs that should be displayed in this environment. These are in addition to the tabs displayed as a result of setting the InheritAllRibbonTabs property to True.
Application Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned.
BuiltIn Property that specifies if the Environment a standard Autodesk Inventor Environment or if it has been added by a client. Built-in environments have restrictions in the edits that can be performed. For example, build-in environments cannot be deleted. For more information, see the Environments overview.
ClientId Property that returns the string that uniquely identifies the client. This is the CLSID of the AddIn in a string form, e.g. "{C9A6C580-3817-11D0-BE4E-080036E87B02}".
DefaultRibbonTab Gets and sets the internal name of the ribbon tab that should be displayed when this environment is activated.
DisabledCommandList Property that returns the DisabledCommandList object. This object allows the environment to disable commands when this environment is active. This list contains commands that are disabled in addition to those specified by the DisabledCommandTypes property.
DisabledCommandTypes Gets list of disabled command types for the Environment.
DisplayName Display Name of the Environment.
ExitDisplayName Gets and sets the exit display name of the environment, to be used on the Finish button. As default this will be the same as the DisplayName. This is the name displayed to the user and should be localized for the current locale.
InheritAllRibbonTabs Gets and sets whether this environment should inherit all ribbon tabs from the 'base' environment. This property applies only to custom environments. If set to True, all visible tabs in the base environment are displayed in this environment.
InternalName Property that indicates the name of the environment.
LargeIcon Gets and sets the LargeIcon for the Environment.
Parent Property that returns the parent of the environment.
PreserveWhenSwitchModelState Gets and sets whether the environment status would be preserved when switch model state in an assembly. This would make sure the environment to be preserved when switch between substitute model state and other model state in an assembly.For built-in environmen.
RadialMarkingMenus Returns the RadialMarkingMenus object that can be used to query and set the selection based radial menu.
Ribbon Property that returns the Ribbon object associated with this environment. This property returns Nothing when the environment is initially created and not yet applied as an override or a parallel environment.
StandardIcon Gets and sets the StandardIcon for the Environment.
Type Returns an ObjectTypeEnum indicating this object's type.

Accessed From

EnvironmentList.Item, EnvironmentManager.BaseEnvironment, EnvironmentManager.EditObjectEnvironment, EnvironmentManager.GetCurrentEnvironment, EnvironmentManager.OverrideEnvironment, Environments.Add, Environments.Item, PanelBar.Parent, UserInterfaceManager.ActiveEnvironment

Samples

Name Description
Add parallel environment with contextual tabs The following sample demonstrates the use of parallel environments and contextual ribbon tabs.
Creation of an override environment for a document A new ribbon tab is created and associated with the override environment.

Version

Introduced in version 5

Was this information helpful?