While loop in code block broken?

Hi All,

I have boiled down a while loop in a code block to it’s essence, and am looking for answers to why it is returning nulls. Maybe my design script is weak.

The left capture is the boiled down version of what I’m trying to do. That one is probably the best example of why I think the while loop is broken…

 

Thank you for any help!

Capture2 Capture

I got this example straight for the Capture3design script manual. It does not work… WHAT IS GOING ON.

Angola,

In the first case you are getting nulls because the following line in your code

xcoord[i]=c1[i][0]+c[i][1];
is pointing to elements that do not exist in your c1
c1={11,21,31,45}
For it to work c1 should be something like this...
c1={{11,21},{31,41}.{51,61},{71,81}};
The second one is terribly formatted. If copied, blindly copied. Should be..
l=[Imperative]

{

a={};

for (i in 0…5)

{

a[i]=i;

}

return=a;

}

 

Hey Vikram,

 

I have been able to get back on dynamo and start learning again. Thank you so much~

1 Like