For and While Loops

Can anyone tell me why I get no results for these two scripts…

@BIMused

image

@BIMused Also read the following , item #6

2 Likes

As Salvo wrote, you forgot to return the list:

Here is a reference guide:

2 Likes

Thanks Salvo!

1 Like

Thanks for that, I starting working through this guide…

http://designscript.io/DesignScript_user_manual_0.1.pdf

…I guess it’s a little dated?

Haha, yeah, that one is version 0.1 while DesignScript has evolved to 2.1, just skimmed over it but won’t continue using it, as there are some outdated stuff like using curly braces for lists instead of square ones. There are many updated resources like the one Salvo posted or Dynamo Primer:

https://primer.dynamobim.org/en/07_Code-Block/7-2_Design-Script-syntax.html

2 Likes

https://dynamobim.org/wp-content/links/DesignScriptGuide.pdf should be updated for 2.1

2 Likes

@architectcoding

Useful to work through to see how I can get the examples to run, here’s another one that has me stumped…

image

…no return?

ok I fixed it here…

image

…so not sure why I can’t explicitly define p as a point type variable?

thats a bug in imperative blocks, we have this tracked internally.

3 Likes