Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete operations on "Timeline" space

1 REPLY 1
SOLVED
Reply
Message 1 of 2
raterWBBQB
360 Views, 1 Reply

Delete operations on "Timeline" space

sk.PNG

 

How do this using API?

1 REPLY 1
Message 2 of 2
marshaltu
in reply to: raterWBBQB

Hello,

 

You cannot delete operations directly from timeline. Instead you can delete corresponding features and then the item in timeline will be gone as well. The following codes demo how to delete the second extrude feature from timeline.

 

Thanks,

Marshal

 

import adsk.core, adsk.fusion, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        
        design = adsk.fusion.Design.cast(app.activeProduct)
        extrude = adsk.fusion.ExtrudeFeature.cast(design.timeline.item(1).entity)
        extrude.deleteMe()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report