Understanding Tecplot file types helps you work more efficiently and get the most out of Tecplot 360. In this Tecplot Tip we define each Tecplot file type and show you an example Tecplot Macro.
Basic Tecplot File Types
- layout file or *.lay is a file that creates a specified plot (e.g. an XY plot of surface temperature vs. time) and is tied to a specific data set.
- style file or *.sty is a file that creates a specified type of plot (e.g. a “doghouse plot”, but is not tied to a specific data set.
- plt file or *.plt is a file of data in Tecplot’s binary format.
- SZL file or *.szplt is a newer Tecplot file format that reduces the amount of solution data loaded when analyzing CFD results (Learn more).
- dat file or *.dat is a file of data in Tecplot’s ASCII format.
- macro file or *.mcr is a file that directs Tecplot to take a given action (e.g. load a *.dat file, and create a standard plot via a chosen *.sty file).
Note that the .sty, .mcr, and .lay files are human readable and editable via a simple text editor like Microsoft Notepad.
You may also want to watch this video:
Tecplot Data File Types
Example Macro
Here is an example of a Tecplot macro that takes the difference between two variables through a range of zones.
#!MC 1000
#
# First must create T_del variable for all zones #
$!AlterData Equation = "{T_del} = 0"
#
# Loop over the base set of zones. Deposit the delta into T_del for the base set of zones only. If you to assign T_del to
# the difference in BOTH sets of zones change "$!AlterData [|Loop|]" to be "$!AlterData [|Loop|,|OtherZone|]"
#
$!Varset |BaseNumZones| = (|NumZones|/2) $!Loop |BaseNumZones|
$!VarSet |OtherZone| = (|Loop|+|BaseNumZones|)
$!AlterData [|Loop|] Equation = "{T_del} = {T ,K}[|Loop|] - {T ,K}[|OtherZone|]"
$!EndLoop
This macro could be named diff.mcr, and then run from the Tecplot menu Scripting >> Play Macro/Script.
Alternately, the macro could be put inside of another macro function. To do this, copy the macro below into the tecplot.mcr file found in the Tecplot root directory. (It’s the same as the above macro minus the #!MC 1000 line)
!MacroFunction Name = “Calculate Difference”
#
# First must create T_del variable for all zones #
$!AlterData Equation = "{T_del} = 0"
#
# Loop over the base set of zones. Deposit the delta into T_del for the base set of zones only. If you to assign T_del to
# the difference in BOTH sets of zones change "$!AlterData [|Loop|]" to be "$!AlterData [|Loop|,|OtherZone|]"
#
$!Varset |BaseNumZones| = (|NumZones|/2) $!Loop |BaseNumZones|
$!VarSet |OtherZone| = (|Loop|+|BaseNumZones|)
$!AlterData [|Loop|] Equation = "{T_del} = {T ,K}[|Loop|] - {T ,K}[|OtherZone|]"
$!EndLoop
$!EndMacroFunction
Run this macro from Tecplot’s quick macro panel (QMP) by selecting Scripting>Quick Macros from the main menu. Then click on the Calculate Difference button.
Macro Resources
- Quick Macros Video Tutorial
- Macro Downloads
- Augmenting XY Line Mapping with Macros
- Macro Knowledge Base Articles

See our Video Tutorial on Quick Macros.