Share

UserInterface.workspaceDeactivated Event

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

The workspaceDeactivated event fires at the VERY end of a workspace being deactivated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Syntax

-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_workspaceDeactivated" is the event handler function.
futil.add_handler(userInterface_var.workspaceDeactivated, userInterface_workspaceDeactivated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the workspaceDeactivated event.
def userInterface_workspaceDeactivated(args: adsk.core.WorkspaceEventArgs):
# Code to react to the event.
app.log('In userInterface_workspaceDeactivated event handler.')

Property Value

This is an event property that returns a WorkspaceEvent.

Version

Introduced in version March 2015

Was this information helpful?