Im working on automating the process of running a dynamo script from a revit addin in C#
I have a working solution to run a Dynamo script from my addin when version 2 is loaded through the user interface.
i have been trying to reverse engineer the process of programatically load a spesific version of dynamo revit, but i cant get it to work.
All i want is to make sure dynamo for revit is initialized and all assemblies loaded just like the version selection popup does. The loading and initialization must happen without any user interaction.
I have tried to load all assemblies from “C:\Program Files\Dynamo\Dynamo Revit\2” and C:\Program Files\Dynamo\Dynamo Core\2 with no luck.
I get an exception message something like: RevitServicesUpdater is not initialized.
If i now try to start dynamo from Revit i can tell that the right version is not loaded because i get the
Dynamo version selection popup
If i start Revit and open dynamo and then select version 2.x.x my addin runs the Dynamo script just fine. To the best of my knowledge this is a assembly loading and initialization issue.
The working code to run a Dynamo script (after the correct version is loaded using the UI) looks like this https://forums.autodesk.com/t5/revit-api-forum/dynamo-script-in-revit-api/m-p/9087859/highlight/true#M41896
In advance, thank you.