generative modeling for Rhino
Hi,
I use external references for a calculation software (Dlubal Rstab) and for feedback reasons (if the calculation is finished) I need to handle an "event".
My try of using this code
"Dim WithEvents IStr As dlubal.RSTAB6.Structure"
does result in th error-message
"WithEvents is not valid on a local variable declaration"
Could somebody please explain where or how to dim an event?
The reason behind it is, that I get the Windows-error "server busy" because the calculation software needs some minutes to solve the scenario. Since I don't want to skip these messages each time by pressing the "any key" on keyboard, I need grasshopper/windows to wait for the other software.
Thanks,
Thorsten
Permalink Reply by Steve Lewis on December 22, 2010 at 9:55am
Permalink Reply by Thorsten Strathaus on January 4, 2011 at 9:19am Hey RubberDuck,
happy new year first!
And, this sounds interesting.
Did you have the time to look for the code?
It would be very interesting for me to look into it.
Thanks in advance
Thorsten
Dale Fugier (or similar) exposed a routine to RhinoScript for me a few years back, I've been meaning to ask him to expose it to dotNet library as I haven't found it there.
For the time being, I use this code, it should also help you. I also revert the value at the end of the routine. Maybe David can advise if it's possible to do this in the dotNET sdk.
Cheers,
Jon
object obj;
RhinoScript4.IRhinoScript rs = null;
obj = RhUtil.RhinoApp().GetRhinoScriptInterface();
rs = (RhinoScript4.IRhinoScript)obj;
if (rs != null)
rs.DisplayOleAlerts(false);

Jon,
You can find this function in RhinoCommon at
Rhino.Runtime.HostUtils.DisplayOleAlerts(bool)
Permalink Reply by Thorsten Strathaus on January 5, 2011 at 2:49am Hi Steve,
and thank you very much !!
I thought I had to differenciate between Com-linked applikations and other OLE-linked ones like Excel, but this ...displayOleAlerts(false) does work fine.
Can't thank you enough,
Thorsten
© 2012 Created by Scott Davidson.
Powered by