CFD Online Logo CFD Online URL
Home > Forums > Visualization & Post-Processing Software > Tecplot

Nested loop macro question in tecplot

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By JohnConnell

LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2020, 08:40
Default Nested loop macro question in tecplot
New Member
Join Date: Mar 2020
Posts: 6
Rep Power: 6
Rannnnnnnn is on a distinguished road
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
Rannnnnnnn is offline   Reply With Quote

Old   January 4, 2021, 14:20
Default RE: Nested loop macro question in tecplot
New Member
John Connell
Join Date: Apr 2017
Posts: 7
Rep Power: 9
JohnConnell is on a distinguished road
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|"

As always feel free to email us at if you have any further questions.

John Connell
Tecplot Support
zimao and BruceJin like this.
JohnConnell is offline   Reply With Quote


loop, macro, tecplot

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tecplot Question Zurayk Tecplot 1 March 27, 2007 20:23
Tecplot question (3d) Jane Tecplot 3 May 11, 2004 10:57
Tecplot question jane luo Tecplot 4 March 23, 2004 15:09
Tecplot question mp Tecplot 2 February 12, 2004 14:08
question about tecplot hall Tecplot 1 June 9, 2003 21:36

All times are GMT -4. The time now is 19:04.