
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a Revit Add-In with many commands. As part of he Add-In I am trying to allow users the ability to specify their own Dynamo scripts to be run at different points within a “long running” command. I have successfully got this setup but have run into a problem. With the way I have it implemented, the user specified Dynamo Script(s) continue to execute after my “long running” command has ended each time a change is made to the Revit project.
Below is snapshot of code I am using to execute the user specified scripts. I’ve tried many combinations of the Journal Key settings but unable to accomplish my needs.
Below I will try to summarize how/where my command executes the Dynamo Script(s)…
-User executes my “long running” command.
-“long running” command goes about it’s business and makes changes to project.
-during certain sections of the “long running” command, the command executes user specified Dynamo Script(s) using code in image above.
-“long running” command continues to go about it’s business and eventually finishes up
The problem I have is that any changes made to project via the command AFTER Dynamo Scripts have been executed cause the Scripts to execute again and again and again…
From my research and trial/error, the user Scripts must be saved in “Automatic” mode for the journal approach to work. From what I gather, the journal approach to executing the scripts acts very much as if user opens the Dynamo Editor and loads their script which then executes automatically but then never closes the editor.
If I switch “ForceManualRunKey” to TRUE, the scripts do not execute until my “long running” command is 100% done which doesn’t work for me.
Any help? I can provide more information if needed.
I've also posted this topic at https://forum.dynamobim.com/t/execute-dynamo-script-from-revit-api/60529
Thanks,
Jon
Solved! Go to Solution.