GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

objarray foreach <variable_name> <obj> <body>

Do a loop over all elements of the objarray, on each iteration set the value of <variable_name> to the i-value and evaluate the script of the body, similar to a for or a foreach Tcl command

e.g.

set obj [objarray new intarray -values {5 6 7 8}] 
-> 5 6 7 8 
objarray foreach x $obj {
   puts "x=$x"
}
-> 
x=5
x=6
x=7
x=8
  • No labels