Executing Script During Runtime
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We have an use case, where we want to run a Grasshopper script using Rhino.InsideRevit automatically.
We can execute the Grasshopper script without any issues by hand, but would want to automatize that step.
We implemented a custom addin to execute a script automatically during Revit's startup. However, we have encountered an issue where not everything is loaded yet during the startup process, leading to some errors. The Grasshopper script is correctly opened, but the execution fails, as multiple components show the following message: "RevitAPI: Writing of Entities of this Schema is not allowed to the current add-in."
This message does not appear, when running the same Grasshopper script by hand.
We believe that the issue appears as we are calling the script during the start up of Revit and probably not all components are initialized correctly.
Therefore, our goal is to find a way to execute a script during the runtime of Revit, after the startup and initialization processes have been completed. We are open to any method that achieves this objective. The script does not need to be a Grasshopper script directly as there are ways to open and execute Grasshopper scripts using C# or python as well.
If anyone has insights or suggestions on how to accomplish this, we would greatly appreciate your input. Thank you in advance for your assistance.