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

Views: 260

Replies to This Discussion

Sorry I think this is the wrong sub forum, I just see that there is a “developers” forum.

p.

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

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.

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

Thanks, I installed the Rhino Common templates for Visual Studio, and made a small plug in, but I am beginner and I test my “program” every minute and it takes a lot of time to debug it, and therefore my question.

Thanks, p

RSS

Translate

© 2014   Created by McNeel Admin.

Badges  |  Report an Issue  |  Terms of Service