Tecplot Macros

Macros are useful for streamlining repetitive operations, executing multi-step tasks quickly, and performing operations that can’t easily be done interactively. They are recordable, easy to edit, and don’t require any development experience.  Better yet, the Tecplot support and development teams have put together these handy Basic Macros and Quick Macro Panel (QMP) files that can be customized to help you automate a variety of tasks.

Macro variables, commands, batch processes, and movie file creation are explained in the Tecplot 360 and Tecplot Focus Scripting Guides and User’s Manual in our Documentation.

Basic Macros

Download any of the .mcr files below, use a text editor to modify it to fit your needs, open it in your Tecplot software, and you should be ready to go.

What the Basic Macro does Click filename to download
Makes a group of points follow an XY curve.
Makes an XY curve appear to grow.
Animates zones so that one or more zones remain active throughout.
Animates two sets of zones loaded to same frame. It activates the first zone of each set, then the second zone of each set, etc.
Animates zones where n consecutive zones are active throughout the animation.
Animates the contents of multiple frames simultaneously. Frames can contain zones or XY maps.
Same as the “Animate IJK Planes” feature under the Tools/Animate menu, except only 1 IJK-ordered zone is animated.
For a 3D i-ordered data set, points will be displayed singly, from first to last, with the index value displayed on each. Each point will be colored according to the value of a 4th variable.
Calculates the total area of all cells which lie above a specified contour variable limit.
Creates a new variable that is set to the AVERAGE of a chosen variable. This AVERAGE is calculated for all of the points in the lowest ACTIVE zone in your dataset. This macro only works on I-, IJ-, and IJK-ordered data.
Calculates the difference between 2 i-ordered XY curves (zones) with different numbers of points.
Integrates the volume below an IJ ordered surface in 2D mode, given a contour variable.
Calculates the area below an XY curve.
Macro to create a plot where scatter symbols are drawn on top of a contour plot where the scatter symbols represent the positions of the minimum and maximum contour value.
Copys a zone multiple times and rotate the duplicates around an XY point. Great for making propellers, turbines, etc. from a single blade.
Switchs the I and J indices of an IJ-ordered zone.
Creates a variable which is uses to number the zones.
Splits an I ordered zone into smaller zones based on the values of one of the variables.
Splits an I ordered zone into smaller zones, based on a user provided number of points for each smaller zone.

Quick Macro Panel (QMP) Files

盈彩彩票These files contain one or more macro functions that can be added to the Quick Macro Panel found in your Tecplot software. As the name implies, this panel gives you quick access to your favorite, commonly used macro functions. To use them, open the file with a text editor, then copy and paste the functions to the tecplot.mcr file located in your Tecplot home directory.

What the QMP File does Click filename to download
A series of functions that set the value blanking to blank all cells outside of the current axis range. (2D or 3D).
Macro functions to allow you to IJK-Blank multiple zones. This uses value blanking to simulate IJK-Blanking.
Macro functions for creating north arrow or scale bar for map plots.
A macrofunction that can do a Probe At on a 2d dataset.
A macrofunction that can do a Probe At on a 3d dataset.


What the Equation does Click filename to download
Using Tecplot’s Specify Equations tool this file calculates the components of the symmetric and antisymmetric parts of the velocity gradient tensor. Using these new tensors the lambda-2 and Q-criterion is determined. For 84% faster Q-Criterion calculations use the Analyze > Calculate Variables dialog in Tecplot 360 2017 R2 or later.

Macro FAQs

Q: How do I export an image when I have hundreds of zones?

If you have hundreds of zones it can be time consuming to switch to each zone and export an image.  Macros can be used here to automatically activate each zone in succession and export an image.

  1. Scripting > Record Macro,
  2. Activate a zone,
  3. Export image
  4. Stop recording.

Then edit the macro file using a text editor and encase the export and activate call in a LOOP and ENDLOOP.  

For more information about macros, see our documentation Scripting Guide.

Q: Are macros and add-ons compatible with all version of Tecplot 360?

Newer versions of Tecplot 360 are backwards compatible with earlier versions of Tecplot 360.

  • TecIO files are compatible with all versions of Tecplot 360.
  • Add-ons will have to be recompiled. They are source compatible, but the libraries will need to be updated.
  • Existing Macros are compatible with earlier Tecplot 360 versions. However, Macros created with Tecplot 360 2014 and later are not backwards compatible with earlier versions.