Hello,
please can anybody post a c# script which I can run directly from visual c# 2010. A console application, for example how to draw a line. Please the complete code with using statements.
Sorry for this basic question.
Thanks a lot, p
Tags:
Permalink Reply by Peter on March 17, 2013 at 9:02am Sorry I think this is the wrong sub forum, I just see that there is a “developers” forum.
p.
Permalink Reply by Dale Fugier on March 19, 2013 at 10:11am Hi Peter,
Here are a couple of C# examples that automate Rhino that you might find useful.
https://github.com/dalefugier/TestDotNetAutomation
https://github.com/dalefugier/SampleCsAutomation
Why do you need/want to automate Rhino from an external application?
-- Dale
Permalink Reply by Peter on March 20, 2013 at 11:45am I don´t want automate Rhino from an external application... :) I started with programming my first plug in. It´s a beginner question: Is the only way to test the program to compile it as plug in and load it to rhino, or is there a possibility to test parts of the program direct as console application. What is the usual work flow, for testing small parts.
Thanks p.
Permalink Reply by Dale Fugier on March 20, 2013 at 11:54am Hi Peter,
If you are not automating Rhino, then you will not be creating a console application. You will be creating a Rhino plug-in, which is a .NET Assembly that references RhinoCommon.dll and has a Rhino.PlugIns.PlugIn-inherited class.
To create a plug-in, first download the RhinoCommon templates for Rhino 5:
http://visualstudiogallery.msdn.microsoft.com/16053049-7db2-4c9f-96...
Then, launch Visual C# 2010 or Visual Basic 2012 and create a new RhinoCommon plug-in project.
When debugging a plug-in, the debug target is always Rhino.exe. The RhinoCommon plug-in sets your project to do this for you.
More on RhinoCommon:
http://wiki.mcneel.com/developer/rhinocommon
Hope this helps.
-- Dale
© 2013 Created by McNeel Admin.
