I think that code will have the same effect as merging the 3 lists
together. What I understand is that he wants to sort it by blocks of
20. First merge the first 20 numbers of the 3 lists, then the next 20,
etc.

I tried to do it by creating a list of numbers and using the sort
component:
http://grasshopper3d.googlegroups.com/web/sortbyblocksof20.ghx

In my example I use 3 lists of 100 numbers each. You will see 3 text
panes with the numbers 3, 5 and 20.
3 is the number of lists you want to merge. 5 is the number of times
each list is divided (100/20 in this case) and 20 is the size of each
division.

On Jan 20, 10:22 pm, Splash <[email protected]> wrote:
> Christian -
>
> With a little help from Rajaa, here is an update sort.  This style of
> sort takes a bit more code.  There are two places you need to change.
>
> First, You need to right-click on the VB component and change each
> Input (x, y and z) to List style.  This will give each one of your
> inputs the complete list of values at one time.
>
> Second, use this code.
>
> -------------------------------------------------
>     Dim Sorted As New List(Of Object)
>     Dim i As Integer
>
>     For i = 0 To x.Count() - 1
>       Sorted.Add(x(i))
>     Next
>
>     For i = 0 To y.Count() - 1
>       Sorted.Add(y(i))
>     Next
>
>     For i = 0 To z.Count() - 1
>       Sorted.Add(z(i))
>     Next
>
>     A = Sorted
> --------------------------------------------
>
> Each input will be a list of values.  You walk through each list and
> add it to your final list "Sorted"
>
> I hope this helps.
>
> - Scott

Reply via email to