Launch Dynamo to a specific .dyn

Is there any way to tell Revit to launch it’s associated Dynamo version and open a specific .dyn? (I do not want to run a Dynamo Player, I’m looking for the full Dynamo application)

I have 4 versions of Revit installed (2020-2023) all pointing to the same Extension ribbon for my company and PyRevit installed on all versions mentioned.

Thanks in advance!
Dustin

Do you need to have Dynamo open, or can you run the script from a button press from a custom pyRevit extension? If you need to modify parameters / inputs, you can use something like Data-Shapes to make some pop-up UI’s.

The fastest method would be creating a pulldown item and placing different scripts inside.
Something like this:

image

After another look, maybe this is what you need:

from pyrevit import HOST_APP
version = HOST_APP.version
subversion = HOST_APP.subversion

if version < 2023:
    #your Code Here for version bellow 2023

if version >= 2023:
    #your Code Here above or equal to 2023

if version == 2021:
    #your Code Here for the exact version

if subversion == 2018.3:
    # your code here for specific subversion
1 Like