algorithmic modeling for Rhino
Hi! Is there a simple way to know how many times does a number appear in a list and get that result as an output? Say a list that contains four times 5 or eight times 3... see JPG attached.
Thanks
Tags:
That's not a list, that's a single multi-line piece of text.
One approach would be to replace all occurrences of the number with a zero-length text. Then measure the length before and after, divide by the length of the text you were replacing and you have your answer.
If your data is a proper list, then you can use [Set Difference] to remove all values identical to some other value. Then again measure the length of the list before and after.
--
David Rutten
david@mcneel.com
Tirol, Austria
It is a proper list, I just unselected draw paths and draw indexes. I want to know how many times does each element of the list appear in the list. Can I do this with set difference?
Thanks!!!
Ah, I forgot about [Member Index] :) That's indeed a lot easier.
--
David Rutten
david@mcneel.com
Tirol, Austria
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