Thanks, now its working and now I can find much more sorting for the
sort component to do, now that I understand the logic. I will try to
work a little on the VB.Net component script since it would be very
easy to use if I get to function correctly. This should be so that I
can determine quickly between how big the blocks of data from each
list that is sorted.

Thank you both for your help.

And if your are interested what I am working on here is a link,
http://www.spacefabrik.net/.

Cheers

Christian

On 21 Jan., 00:14, visose <[email protected]> wrote:
> 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