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!!!
I'll tell you what I know:
I hope this helps,
it seems to use python is a better choice.....Thank you Giulio!
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#?
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.
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.
Thank you for clear explanation!
L'ho capito!!Questo ha bisgno tanto tempo a imparlarlo.
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.