How do I use a .dyn script instead of a .py script in a bundle?

When I first got into pyRevit I was able to use a dynamo file as the script in the bundle, but now I get a message saying: “can not find target file”. I am pretty sure that I have things set up correctly…can anyone give me some clues as to how to use .dyn files in the bundles?

Hi @EENagel and welcome,
the main thing is to name the script with script.dyn minimally but that could be whateverthename_script.dyn
and
to make it run in automatic (Haven’t tried that specifically if it has a built in UI to make it like this one (dyn with UI))
you will find an example here:

or another one here

or a new one coming here that will be an extension to create bundles

pyRevit will run dyn, py, cs and vbs files all just fine.

Just make sure the file name is:

  • *script.py
  • *script.cs
  • *.script.dyn
  • *.script…vbs

For dynamo - make sure you set the graph to manual mode. Also any input will have to be done with forms. There is no interface like the dynamo player.
And edit the bundle.yaml for:

engine:
    clean: true

Dynamo can be troublesome if it hangs around in the background. Starting with a clean engine is slower. But keeps you out of trouble,

1 Like