Hi David,

there are already some posts about the problem of using c# for
scripting and a list as output. You said in the latest post concerning
this matter, which was posted on nov 17th, the bug will be fixed in
the next release. So I've downloaded the latest release version
05.0098 from nov 25th, but my simple test-script doesn't work
unfortunately.
Could you please tell me, what I'm doing wrong, or is the bug still
there?

I just tried to rebuild the example "scripted circles" written in VB-
script of the offical site in c#-code:
http://en.wiki.mcneel.com/content/upload/files/VBNET_Script.zip


Here is my script:

using System;
using System.IO;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using Microsoft.VisualBasic;

using RMA.OpenNURBS;
using RMA.Rhino;
using Grasshopper.Kernel.Types;

class Grasshopper_Custom_Script
{
#region members
  private MRhinoApp app;
  private MRhinoDoc doc;

  public System.Object A;
#endregion

  void RunScript(double x, double angle, int N)
  {
    /// <your code>
    List<OnCircle> c_list = new List<OnCircle>();

    for (int i = 1; i <= N; i++)
    {
      ///Declare a new circle
      OnCircle c = new OnCircle(new On3dPoint(0.0, 0.0, 0.0), i);

      c.Rotate(angle * i, new On3dVector(0.0, 1.0, 0.0), new On3dPoint
(x, 0.0, 0.0));

      c_list.Add(c);

    }

    A = c_list;

    /// </your code>
  }

#region "Additional methods and Type declarations"

#endregion
}

Thanks in advance,
Ines

Reply via email to