Hi @maurizio_manzi .
The Operation object did not have a deleteMe method, so I looked for another way.
Since there was a deleteEntities method in the Cam object, I thought I could delete it by doing the following, but I got an error.
# Fusion360API Python script
import traceback
import adsk.core as core
import adsk.cam as cam
def run(context):
ui: core.UserInterface = None
try:
app: core.Application = core.Application.get()
ui = app.userInterface
camObj: cam.CAM = app.activeProduct
setup: cam.Setup = camObj.setups[0]
ope: cam.Operation = setup.operations[0]
objs: core.ObjectCollection = core.ObjectCollection.create()
# objs.add([ope]) # NG
objs.add(ope)
# https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-3C5139A6-8639-4466-8DB5-008B721BC059
camObj.deleteEntities(objs)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
I may be missing something, but the only thing I can think of is to set isSuppressed = True.