Grasshopper

algorithmic modeling for Rhino

Hey Guys,

 I am storing data outside the RunScript function, im writing a component in C# -Visual Studio.

Right now i am storing two variables inside of the class after all functions.

<code>
private static List<Point3d> vPts;
private static List<Vector3d> dVecs;
</code>

I am not getting any errors during the build or in gH, but the component is not functioning.

Thanks much


Views: 339

Replies to This Discussion

hmm,

how do i enter

code

into the original discussion box..?
Hi Brendon,

are you constructing these lists at any point? Is there an error you get? If so, what does it say?

How can you write code in the RunScript function if you're using Visual Studio? Or did you mean SolveInstance?


I don't know how to enter code in the first post....

--
David Rutten
david@mcneel.com
Poprad, Slovakia
op sorry, yeah, im calling them outside of the SloveInstance.


here are the constructor statements:


if ((vPts != null))
{
if ((vPts.Count != pts.Count))
{
vPts = null;
}
}
if ((vPts == null))
{
vPts = new List(pts.Count);

for (int j = 0; j <= pts.Count - 1; j++)
{
vPts.Add(pts[j]);
}
}

if ((dVecs == null))
{
dVecs = new List();
CreateVecs(pts, dVecs, speed);
}



hmm, Im not getting any errors in the build or in gH.
hey david, i sent you an email, with the class in it.. thanks a lot

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service