Nested loop macro question in tecplot
How to use nested loop in tecplot?
If there is only one LOOP, I can use |LOOP| in my program. But when Loops is nested up to two or more levels deep, if I still use |LOOP| in my program, how can tecplot distinguish which |LOOP| is for which LOOP level? A example of two or more loop level will be easily understood |
RE: Nested loop macro question in tecplot
Hello,
In nested loops of the Tecplot macro language, the intrinsic |LOOP| variable is bound to the loop number of the inner-most loop. In order to reference the outer loop number, you'll need to save it as a variable. Here is an example macro of the inner and outer loops: #!MC 1410 $!LOOP 2 $!VARSET |OuterLoop| = |LOOP| $!LOOP 3 $!PAUSE "Outer Loop: |OuterLoop|\nInner Loop: |LOOP|" $!ENDLOOP $!ENDLOOP As always feel free to email us at suport@tecplot.com if you have any further questions. Thanks, John Connell Tecplot Support |
All times are GMT -4. The time now is 15:12. |