Torabi Architect.
Mathsurf Documents Dec 2008
arrowAdd loop.
Loop Dialog

Loops are repetitive operations that tell MAX-Script to repeat the execution of a collection of commands. You can use both “For” statement and “While” statement inside the function by using “Add loop” button.


Loop Dialog: lets you to define new loop or edit existing loops.
To make a “For” statement select “For” radio button and choose a variable and range, for example in loop

for index = 0 to usegments+1 do (…)

variable is “index”, start is “0” and end is “usegments+1”.in case of stepped loops the Step variable must be set. For the “While” Statements, radio button should be in “While” status and condition must be defined. For instance we assume

While (A<5) do (…)”, Condition is “A<5


Note 1: don’t use global variables or preset variables as a loop variable.

When you add a loop in function definition a new rollout has been add to the current rollout. In first line of loop’s rollout three controls appears. These controls let you to add more commands inside the loop or modify it.


Edit Button brings the loop dialog with existing condition. You can edit the loop’s parameters.


Remobe Button will remove the loops but it will keep the commands inside it. If you delete a loop all operations inside the loop will be appear in same place and if the loop was a part of another sub rollout it’s commands will remain in the parent rollout after removing.


Drop Down Menu lets you insert new commands into the current loop. You can add another loop into the existing loop as well as other commands.

For rollout
arrowFunction Definition Dialog.
arrowFormoula Definition.
arrowPlug-in features.
arrowBack to Index
www.torabiarchitect.com