algorithmic modeling for Rhino
We have some GH code that we're calling using Rhinoscript. As part of this Rhinoscript we're also making a call to a C# interface.
When the Rhinoscript starts up it should check to see if a directory exists, if it doesn't then the C# should be called and the Rhinoscript should wait until the C# code has executed successfully to continue running.
How should I go about getting the Rhinoscript to "pause" and wait for the C# to run?
Thanks!
Matthew
Tags:
Your C# code should not return control to the callee (RhinoScript in this case) until it's done with its job. Then RhinoScript doesn't have to jump through hoops.
--
David Rutten
david@mcneel.com
So then how do I lock the flow from the C# bit of the plug-in. As it stands it gets called then the RhinoScript just goes about its business like a train off rails.
How are you invoking the C# part?
--
David Rutten
david@mcneel.com
Rhino.Command
Is there a better way?
-Matthew
That should still not return until the C# plugin yields control back to the callee.
I think perhaps your C# plugin command class starts doing something on another thread and immediately returns control on the main thread. However without seeing that code I can't be sure.
--
David Rutten
david@mcneel.com
ps. judging from the flatness of this discussion you're having trouble using straight forward reply as well?
The issue is that we created a GUI that feeds some content to Grasshopper. Our GUI starts up but once it up the control sequence doesn't halt so our GH just runs independent of the C# results.
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by