Share

CAM.setupDeactivating Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The SetupDeactivating event fires before a setup is deactivated.

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. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupDeactivating" is the event handler function.
futil.add_handler(cAM_var.setupDeactivating, cAM_setupDeactivating, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupDeactivating event.
def cAM_setupDeactivating(args: adsk.cam.SetupEventArgs):
# Code to react to the event.
app.log('In cAM_setupDeactivating event handler.')

Property Value

This is an event property that returns a SetupEvent.

Version

Introduced in version April 2023

Was this information helpful?