Repeat command once it is set to automatic

So now that I have my pyrevit bar working in Revit 2026 (kind of) now I have another issue. (I fix one then another breaks) when I use a toolbar to run a dynamo script (data shapes) it pops up just fine. but when I select the objects to delete. and hit continue (end) the (Data Shapes) popup box comes back up twice. (Assuming it is because of the pyrevit making me keep the scripts to automatic (loader issue). I can work with that but then if I try and place a section or elevation on plan it runs the script again like it wants me to delete them again.

Using Revit 2026,
Pyrevit 6.1.0.26047+2255 and
Dynamo 3.6.1
Data Shapes 2026.4.2

Is there a way to tell the dynamo script to end after it completes or tell pyrevit to not use automatic

Thanks in advance for the help I have attached the scripts below

Delete Unused Sections_script.dyn (35.6 KB)

Delete Unused Elevations_script.dyn (33.9 KB)

for your last question i guess you have better luck on the PyRevit forum,try there

2 Likes

Try clearing any element bindings and run it via Player. If that doesn’t double the execution then we can confirm a PyRevit issue and you’ve already got the links to that location.

Note that they’re still distributing and very reliant on IronPython2 which means you’re putting yourself, your company, and every company you work with at risk of a major infosec incident.

1 Like

I did run it in player and it also runs fine using just dynamo. And for the cybersecurity warning that is another topic (good hackers will get in wherever they want.)

So, I will reach out to the pyrevit team thanks for the help. Alway get help from everyone on here best forum there is!

1 Like

Maybe worth exploring too? GitHub - johnpierson/Relay: Relay allows for you to add Dynamo graphs to your Revit ribbon. · GitHub

(Note: project is open source and freely available, it doesn’t come with any guarantees or support.)
:see_no_evil_monkey:

2 Likes

Whilst not as flexible as data shapes, if you do find yourself eventually building interfaces and winforms/wpf is a bit much, theres a fairly easy input stacker in rpw.ui, sharing in case it helps in future:

Pyrevit also does have a solid forms library, although it generally deals with 1 form at a time:

I definitely appreciate that their forums are quieter and have a smaller community, but encourage you to post there too to help drive community for the tooling.

1 Like

thank you Gavin for that I will check into it. You always steer me in the right direction.

SO as an answer from Pyrevit. (not Data Shapes) was that pyrevit has a new loader and that was causing the issues. once I set pyrevit to use its old loader (they say it is slower) everything worked like it used to. Unfortunately, I had to go back and reset all my scripts back to manual ugh. They did say they would look into the matter further.

1 Like

On a funny note, I did spell one of the tabs wrong in the bundle.yaml file (CleanUP vs Cleanup) the new loader didn’t care and since it was at the end of the stack, I never noticed the issue. Now when I switched to the old loader spelling mattered and it just dropped that part of the toolbar lol

Took me a second and then I was like Duh my bad.

FYI: you can bulk toggle a full directory via batch editing the .dyns as if they were text files (they’re JSON files underneath).

2 Likes

Damn didn’t think of that! Thank you jacob. if I have to switch them back to Auto again I will definitely set up using that method

1 Like