Grasshopper

algorithmic modeling for Rhino

Hi All,

I'm writing a custom Goal that acts on a collection of vertices. For each of those vertices there is a numeric value I want the solver to output during debugging.

If I have added an 'Output' method to my custom GoalObject. It collects the values for each vertex that the goal acts on in an array, and then returns that array.

The output of the solver however doesn't return the array of values, but returns the string 'System.Double[]', without access to the actual values.

Outputting a single value works without problems. But lists or arrays have the above problem.

What am I mising here...?

Jack

Views: 439

Replies to This Discussion

Make sure you convert using .ToList() and use the DA.SetDataList method on your output of you're in VS.

Marc

Hi Marc,

Thanks for the reply.

It turns out that the string indicates that the output array is of the proper type, but empty (BTW not all k2 solvers show this empty output, some remove it from the outputlist).

It turns out the output does not have to be converted to a list, arrays works fine.

Jack

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service