User Interface Events
The EnvironmentChange event notifies the client when the active environment switches from one environment to another.
EventNames:
EnvironmentChange_Pre
EnvironmentChange_Post
Parameters
Type |
Name |
Description |
|---|---|---|
environmentState |
Indicates the transition state the environment is going through. |
Examples:
EnvironmentChange_Pre:
Register-InventorEvent -EventName EnvironmentChange_Pre -Action 'PreEnvironmentChange'
function PreEnvironmentChange($environmentState) {
#Write event code here
}
EnvironmentChange_Post:
Register-InventorEvent -EventName EnvironmentChange_Post -Action 'PostEnvironmentChange'
function PostEnvironmentChange($environmentState) {
#Write event code here
}
Event that is fired when the ribbon user interface is reset.
EventNames:
ResetRibbonInterface_Post
Examples:
ResetRibbonInterface_Post:
Register-InventorEvent -EventName ResetRibbonInterface_Post -Action 'PostResetRibbonInterface'
function PostResetRibbonInterface() {
#Write event code here
}
The ResetEnvironments event notifies the client when environments have been reset.
Remarks:
The end-user resets environments using the “Reset” and “Reset All” buttons on the Environments tab of the Customize dialog. * The “Reset” button on the Environments tab will cause this notification to be sent for the currently selected environment. * The “Reset All” button causes this notification to be sent where the Environments argument will contain all of the existing environments. When an environment is reset it is set back the default state, but the environment is not deleted. The primary use of this notification is to allow add-ins to reconfigure their environments after a reset has occurred.
EventNames:
ResetEnvironments_Post
Examples:
ResetEnvironments_Post:
Register-InventorEvent -EventName ResetEnvironments_Post -Action 'PostResetEnvironments'
function PostResetEnvironments() {
#Write event code here
}
Event that is fired when command shortcuts/aliases are reset in the Customize dialog (using either the “Reset All Keys” or “Reset All” button).
EventNames:
ResetShortcuts_Post
Examples:
ResetShortcuts_Post:
Register-InventorEvent -EventName ResetShortcuts_Post -Action 'PostResetShortcuts'
function PostResetShortcuts() {
#Write event code here
}