Running Script for Current Document through Dynamo Player

I’m having an issue running my script on the current document with the player without having to open the script for it to work. I have a folder of scripts already mapped to my dynamo player. If I open a new instance of Revit, open the model, and try to run one of the scripts, nothing happens. It reports that it ran the script with no errors, but it doesn’t do it’s job. However, if I open the script using the edit button, the script will then work so long as I’m in the same instance of Revit. Any help? Thanks in advance


I have multiple scripts in the folder that are essentially copies, just looking for different parameters and associating them to different Global Parameter, however the rest of the script is an exact copy. I only have to open one of the scripts for editing, and then they all work.

Hard to immediately say what the problem is, but my first thought is you can set the global parameter selections you have to “is input” by right clicking on them. This will let you select any global parameter with only 1 script from the dynamo player, rather than having to duplicate it like you said. Maybe setting those as inputs will also allow the script to run in the project without having to open the editor since the script will be looking for an input.

Thankyou for the reply. The problem I see with that is right now I’m able to make different ‘bundles’, if you will, of associations. For example, this is the sheathing script, which looks for both Plywood and Gyp sheathing and automatically associates all of those parameters in the project accordingly. We also have, for example, a weather barrier script, which contains 4 parameter / global parameter pairs, and so on. Your method, if I understand correctly, would mean I would have to have a different script for every individual pair, and open up the risk of the user inputing the wrong global parameter.

Ya my method would require more know-how on the end user’s part. If that doesn’t work with what you’re going for, that makes sense.

It’s hard to say without having the script myself, what are the watch nodes returning before you open the editor? If it is returned empty, it probably means your All Elements of Category isn’t pulling in any data. That node should work fine in this case, not sure why that would happen. Is there any chance this is an older code that would have an outdated node since the switch to Python 3?

Everything you just asked is new to me, please bare with me. How would I check the watch node output without opening the script in the editor. I have no problem sharing the script with you if you’re willing to look into it.
Associate Gloabal Parameters - Sheathing.dyn (45.8 KB)

If you rename the watch node, it shows up as an output in the input/output selection part of the dynamo player.

1 Like

So I got the watch nodes setup as output, and they are returning every value I would expect. Still, no association is occurring.

Turns out my Orchid Package was out of date, after updating I was able to run from the player as expected. Thanks for your help!

1 Like