- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I'm trying to change the order of circuits in the Panel Schedule. Usually GUI options Move Up, Move Down are
used (pic below), but this time we have too many schedules to do this manually.
I tried using Dynamo Python script to automate this. I have found the suitable API entry at PanelScheduleView Class and wanted to use MoveSlotTo . The following snippet of code seems to move an entry to a desired position, as I wanted it to (pic and code below).
psv = UnwrapElement(IN[0])
fr = 12
to = 13
can = psv.CanMoveSlotTo(fr,1, to, 1)
if can:
TransactionManager.Instance.EnsureInTransaction(doc)
psv.MoveSlotTo(fr,1, to, 1)
TransactionManager.Instance.TransactionTaskDone()
The problem is, when a schedule is filled, the function prevents me from swapping the places of two entries. There is also no room in the schedule to temporarily move one of them somewhere else. I get the following warning if I remove the IF safeguard (CanMoveSlotTo method) (pic below).
I can't see any other function in the API I could use. Is there any other way to reorder the schedule entries?
Thank you for help!
Solved! Go to Solution.