Cannot delete timeline group from add-in: InternalValidationError

Cannot delete timeline group from add-in: InternalValidationError

kriomant
Advocate Advocate
261 Views
2 Replies
Message 1 of 3

Cannot delete timeline group from add-in: InternalValidationError

kriomant
Advocate
Advocate

I have add-in with command which does this:

    design = adsk.fusion.Design.cast(app.activeProduct)
    timeline = design.timeline

    for selection in ui.activeSelections:
        selectedEnt = selection.entity
        timelineObj = selectedEnt.timelineObject
        timelineObj.parentGroup.deleteMe(False)

Various checks are removed for brevity. Only one entity is selected, it's inside of timeline group, but I get

 

File "…/adsk/fusion.py", line 95662, in deleteMe

return _fusion.TimelineGroup_deleteMe(self, deleteGroupAndContents)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

RuntimeError: 2 : InternalValidationError : res

 

0 Likes
Accepted solutions (1)
262 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor

I tried to reproduce this by creating many sketches, grouping some, and then deleting the group using the API. It works OK for me. Maybe the type of objects in the group is causing the different behavior? 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 3

kriomant
Advocate
Advocate
Accepted solution

Seems I nailed it: group must be collapsed for you to be able to delete it.

0 Likes