CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2020, 09:40
Default Nested loop macro question in tecplot
  #1
New Member
 
HAORAN LI
Join Date: Mar 2020
Posts: 6
Rep Power: 4
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, 15:20
Default RE: Nested loop macro question in tecplot
  #2
New Member
 
John Connell
Join Date: Apr 2017
Posts: 7
Rep Power: 7
JohnConnell is on a distinguished road
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
zimao and BruceJin like this.
JohnConnell is offline   Reply With Quote

Reply

Tags
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 21:23
Tecplot question (3d) Jane Tecplot 3 May 11, 2004 11:57
Tecplot question jane luo Tecplot 4 March 23, 2004 16:09
Tecplot question mp Tecplot 2 February 12, 2004 15:08
question about tecplot hall Tecplot 1 June 9, 2003 22:36


All times are GMT -4. The time now is 18:45.