Manipulate Lists/Array

Hi All,

Just wondering if anyone could help with a question on manipulating a list/array.

An example of what I am trying to do is select a row of building envelope elements or multiple rows based on a variable.

For example selecting every 3rd row or even more complex selecting every 2nd panel on every 4th row.

As a basic example I thought I would start with a line with points and try and create a list that just showed every second point.

So starting with: {point1[0], point1[1], point1[2], point1[3], point1[4], point1[5], point1[6], point1[7]}

And returning: {point1[0], point1[2], point1[4], point1[6]}

I thought I could do it with a point by function node?

So I started testing but with no luck. My final function looked a bit like this:

 

function (Point[] Llist)

{

for (int i = 0; i < Llist.Count; i+=2)

{

Point pList = new Point(this).xxxxxxxxx;

}

Point PPoint = new Point(pList);

}

 

But I am obviously missing something, I tried multiple options in place of the xxxxxxx but with no luck, maybe I am going down the wrong path!

Any tips would be welcome

 

Thanks

Wayne