Message 1 of 2

Not applicable
02-26-2018
04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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()))