Grasshopper

algorithmic modeling for Rhino

hey,

i'm quite new on GH;

I'm searching a way to count points and obtain the result into a integer?

Someone know how to do that?

I'm trying with a list length but I could not transform the length into integer!

many thanks

Views: 16481

Replies to This Discussion

List length is an integer!  Unless you run it through a text panel.  Post code.  You will save time and get better results.

Hi,

be aware that list.Length != list.Count.

I think you need list.Count. (list.Length is the capacity of your list)

For Arrays you can use array.Length

Cheers,

Raul

eh, what? In .NET, List.Count and List.Capacity are not the same thing (Count = number of items actually contained in the list, Capacity = number of items the list could potentially contain before it has to allocate more memory), but that has nothing to do with GH components.

yep, that's true!

But without code, i can't see if its a native GH component or a C# one...

The List Length component allways outputs a int and it works perfect.

Hey everybody!

Thanks for your answers!

I got the solution :

Listlength and flaten it!

that's the flatten that allow to obtain the integer!

Thanks!

Genius!  (sarcasm)  You have a lot more to learn about data trees...

Him and me both. Thanks for the tips! Be nice!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service