algorithmic modeling for Rhino
Would using Flatten help ?
Hi Andrea,
either flatten the data structure beforehand, or you'll need to make sure the x input has Tree access. Then, you can iterate over all values in the tree to find the biggest one.
private void RunScript(DataTree<double> x, ref object A)
{
double max = double.MinValue;
foreach (double val in x.AllData())
{
max = Math.Max(max, val);
}
A = max;
}
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by