generative modeling for Rhino
1,can i change the background color of view in C#script?
2,how to excute the "rhinoscript" in C#script?
thank you in advance,have a nice day!!!
Tags:
Permalink Reply by Giulio Piacentino on April 30, 2012 at 8:33am Hi Andrea
I'll tell you what I know:
I hope this helps,
- Giulio
__________________
giulio@mcneel.com
Permalink Reply by Andrea Lu on April 30, 2012 at 8:44am it seems to use python is a better choice.....Thank you Giulio!
Ciao Andrea
Rhino.ApplicationSettings.AppearanceSettings.ViewportBackgroundColor = Color.White;
This sets the background color to White.
You can use the AppearanceSettings class to set a few different things in the rhino viewport. look here
Hope this is something you can use.
Why do you need to execute a rhino script within c#?
Saluti Florian
Permalink Reply by Andrea Lu on May 1, 2012 at 4:49pm Grazie,Florian
you are a italian?but your name seems to be no....
i have tried your code,it works,you are bravo!but i know this can be find in Rhinocommon,but how can you find the method...because there are a lot of things in Rhinocommon....
why?because i find that in python we can use the rhinoscript,so i ask whether it can be used in C#script.
Saluti
Si sono italiano, ma di madrelingua tedesca ;-)
I'm happy that it worked. I do often use the keyword search function, if i don't get it from the folding menu bar on the left. In this case i typed "background color" and it showed up many different results such as viewport background color.
I know in the beginning it is a bit tricky to find something, but once you know where to find which type of class you're much faster. Also in Grasshopper the namespace is set to Rhino.Geometry. If you start typing "Rhino." you can access many other interesting classes, but i'm sure you already knew that.
saluti flo
Permalink Reply by Andrea Lu on May 1, 2012 at 5:42pm Thank you for clear explanation!
Vielen danke!
L'ho capito!!Questo ha bisgno tanto tempo a imparlarlo.
Permalink Reply by Giulio Piacentino on May 2, 2012 at 1:17am Sorry guys, I had obviously misunderstood the first question. I thought it was about the background color of the C# script editor. Occasionally somebody asks about that, too. Thank you Florian for spotting this.
To continue the conversation about the RhinoScript library: everything that can be done in rhinoscriptsyntax in Python can be done also in RhinoCommon ("Rhino."). But my personal feeling is that often the brevity of Python, combined with the straightforwardness of the RhinoScript library are really convenient. You can see an example with all 3 RhinoCommon samples (Vb.net, C# and Python RhinoCommon) and one Python RhinoScript here, in that conversation by Arthur.
I hope this helps, and sorry again about my confusion at point 1.
Thanks,
- Giulio
________________
giulio@mcneel.com
© 2013 Created by Scott Davidson.
Powered by