How to refer to rhinoscriptsyntax in C# or VB


#1

Hi, everyone, I’m an architecture student. I used to make grasshopper components with C# or VB in visual studio and recently began to script with Python. The library rhinoscriptsyntax is very impressive, the syntax of functions (or methods) are very close to the manual Rhino operation, which is a good thing for architecture students. As it’s not so convenient to code geometric operation with Rhino.Geometry library, I really want to use rhinoscriptsyntax in C# or VB programming with Visual Studio. Is there any way to make it?

I’ve found the file “rhinoscriptsyntax.py” and “RhinoScript.dll”, tried to cpmpile it in VS, but failed. It seems that “RhinoScript.dll” is not the rhinoscript library used in the python file.

Thanks a lot for your help!


(Dale Fugier) #2

Hi Mark,

I don’t think you want to (try to) call rhinoscriptsyntax methods from C# or VB. Rather, you might consider porting these methods to C# or VB. The source for rhinoscriptsyntax is included with the Rhino 5 install, and all these methods just call into RhinoCommon. So porting should be straight forward.

To find the source, look here:

%APPDATA%\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript


#3

Hi dale,

Thank you! I found the those python files. They are all excellent examples of coding with RhinoCommon library. It seems I should learn more about RhinoCommon library.

Really thanks a lot again!!!