tecplot reference manual 1

Upload: idhoe81uh2132

Post on 02-Jun-2018

253 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Tecplot Reference Manual 1

    1/342

    TecplotReference Manual

    Version 10

    Amtec Engineering, Inc.

    Bellevue, Washington

    September, 2003

  • 8/10/2019 Tecplot Reference Manual 1

    2/342

    ii

    Copyright 1988-2003 Amtec Engineering, Inc. All rights reserved worldwide. This manual may not bereproduced, transmitted, transcribed, stored in a retrieval system, or translated in any form, in whole or inpart, without the express written permission of Amtec Engineering, Inc., 13920 Southeast Eastgate Way,Suite 220, Bellevue, Washington, 98005, U.S.A.

    This software and documentation are furnished under license for utilization and duplication onlyaccord-ing to the license terms. Documentation is provided for information only. It is subject to change withoutnotice. It should not be interpreted as a commitment by Amtec Engineering, Inc. Amtec assumes no lia-bility or responsibility for documentation errors or innacuracies.

    SOFTWARE COPYRIGHTS

    Tecplot 1988-2003 Amtec Engineering, Inc. All rights reserved worldwide.

    ENCSA Hierarchical Data Format (HDF) Software Library and Utilities 1988-1998 The Board ofTrustees of the University of Illinois. All rights reserved. Contributors include National Center for Super-computing Applications (NCSA) at the University of Illinois, Fortner Software (Windows and Mac),Unidata Program Center (netCDF), The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark

    Adler (gzip). Netpbm, Bmptopnm 1992 David W. Sanderson. Ppmtopict 1990 Ken Yap.

    TRADEMARKS

    Tecplot, Preplot, Framer and Amtec are registered trademarks or trademarks of Amtec Engineering, Inc.

    Encapsulated PostScript, FrameMaker, PageMaker, PostScript, PremierAdobe Systems, Incorporated.GhostscriptAladdin Enterprises. Linotronic, Helvetica, TimesAllied Corporation. LaserWriter, MacOS XApple Computers, Incorporated. AutoCAD, DXFAutodesk, Incorporated. Alpha, DEC,

    DigitalCompaq Computer Corporation. lan License Manager is a trademark of lan ComputerGroup, Incorporated. LaserJet, HP-GL, HP-GL/2, PaintJetHewlett-Packard Company. X-DesignerImperial Software Technology. Builder XcessoryIntegrated Computer Solutions, Incorporated. IBM,RS6000, PC/DOSInternational Business Machines Corporation. BookmanITC Corporation. XWindowsMassachusetts Institute of Technology. MGI VideoWaveMGI Software Corporation.ActiveX, Excel, MS-DOS, Microsoft, Visual Basic, Visual C++, Visual J++, Visual Studio, Windows,Windows MetafileMicrosoft Corporation. HDF, NCSANational Center for Supercomputing Appli-cations. UNIX, OPEN LOOKNovell, Incorporated. MotifOpen Software Foundation, Incorporated.GridgenPointwise, Incorporated. IRIS, IRIX, OpenGLSilicon Graphics, Incorporated. Open Win-

    dows, Solaris, Sun, Sun RasterSun MicroSystems, Incorporated. All other product names mentionedherein are trademarks or registered trademarks of their respective owners.

    NOTICE TO U.S. GOVERNMENT END-USERS

    Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in subpara-graphs (a) through (d) of the Commercial Computer-Restricted Rights clause at FAR 52.227-19 whenapplicable, or in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause atDFARS 252.227-7013, and/or in similar or successor clauses in the DOD or NASA FAR Supplement.

    Contractor/manufacturer is Amtec Engineering, Inc., Post Office Box 3633, Bellevue, WA 98009-3633.

  • 8/10/2019 Tecplot Reference Manual 1

    3/342

    iii

    Contents iii

    Macro Command Language 1

    CHAPTER 1 Introduction 3

    CHAPTER 2 Managing Macros 5

    Macros vs. Macro Functions vs. Macro Commands 5

    Running Macros from the Command Line 5Running Macros from the Tecplot Interface 6

    Running Macros from the Quick Macro Panel 6

    CHAPTER 3 Macro Command Syntax 9

    CHAPTER 4 Macro Command Summary 13

    CHAPTER 5 Macro Commands 21

    CHAPTER 6 Parameter Subcommands 205

    CHAPTER 7 Parameter Assignment Values, Expressions,and Arithmetic and Logical Operators 231

    Assignment Value Table 231

    Assignment Value Expressions 237

    Contents

  • 8/10/2019 Tecplot Reference Manual 1

    4/342

    Contents

    iv

    CHAPTER 8 Macro Variables 241Internal Variables 242

    System Environment Variables 245Example 1 246

    Example 2 246

    User Defined Variables 246

    Assigning Values to Macro Variables 246

    Assigning a String to a Macro Variable 247

    Replacement Text Use 247

    Macro Function Variables 248

    Using Formats in Macro Variables 249

    CHAPTER 9 Raw Data 251

    CHAPTER 10 Macro Language Limitations 255

    Binary Data 257

    CHAPTER 11 Writing Binary Data for Loading intoTecplot 259

    Function Summary 260

    Binary Data File Function Calling Sequence 261

    Writing to Multiple Binary Data Files 262

    Character Strings in FORTRAN 262

    Boolean Flags 262

    Binary Data File Function Reference 262Example Programs 299

    Simple Example (FORTRAN) 299

    Simple Example (C) 301

    Complex Example (FORTRAN) 302

    Complex Example (C) 310

  • 8/10/2019 Tecplot Reference Manual 1

    5/342

    v

    Index 319

  • 8/10/2019 Tecplot Reference Manual 1

    6/342

    Contents

    vi

  • 8/10/2019 Tecplot Reference Manual 1

    7/342

    PART I Macro

    Command

    Language

  • 8/10/2019 Tecplot Reference Manual 1

    8/342

    2

  • 8/10/2019 Tecplot Reference Manual 1

    9/342

  • 8/10/2019 Tecplot Reference Manual 1

    10/342

    Chapter 1. Introduction

    4

    then start recording to a new file. Using a text editor, you can insert macro commands from a

    new file into an existing macro file.

  • 8/10/2019 Tecplot Reference Manual 1

    11/342

    5

    CHAPTER 2 Managing Macros

    Tecplot macros are stored in files. These files are processed by loading them into Tecplot andrunning them.

    2.1. Macros vs. Macro Functions vs. Macro Commands

    A Tecplot macro is a file containing one or more macro commands. These files start with thefollowing special comment line to notify Tecplot that what follows is a Tecplot Version 10macro:

    #!MC 1000

    Any number of macro commands or comments may follow.

    Tecplot macro functions are defined are defined in Tecplot macros by using the $!MACRO-FUNCTION-$!ENDMACROFUNCTIONcommands. Between the $!MACROFUNCTIONand$!ENDMACROFUNCTIONcommands you may use any valid macro command (except$!MACROFUNCTION). When a Tecplot macro is loaded, all macro functions are extracted andthe attached commands are not executed until a $!RUNMACROFUNCTIONcommand isencountered (see Section 8.7, Macro Function Variables, for examples).

    Macro functions may be retained if desired. A retained macro function remains defined inTecplot even if the macro in which it was defined is replaced by another macro. Retainedmacro functions may be called by other macros that are loaded at a later time.

    2.2. Running Macros from the Command Line

    A simple way to run a Tecplot macro is to include it in the command line with the -pflag. The

    following command runs Tecplot and plays a macro called a.mcr:

  • 8/10/2019 Tecplot Reference Manual 1

    12/342

    Chapter 2. Managing Macros

    6

    tecplot -p a.mcr

    If you use the .mcrextension for the macro file name, then the -pflag is optional. If youwant to debug the macro, include the -zflag as well.

    2.3. Running Macros from the Tecplot Interface

    You can run a macro file by going to the File menu and selecting the Macro sub-menu, fol-lowed by the Play option. A dialog appears; choose the macro to play.

    If you want to debug a macro file, go to the File menu and selecting the Macro sub-menu, fol-lowed by the View option. The Macro Viewer dialog appears so you can load in a macro.When the macro is loaded, Tecplot waits at the first macro command for you to step throughthe commands. See Chapter 27, Macro Commands, in the Tecplot Users Manualfor com-plete details on how to use the Macro Viewer.

    2.4. Running Macros from the Quick Macro Panel

    Macros that you use frequently or want rapid access to may be defined as macro functionswithin a special file called tecplot.mcrin either the current directory, your home directory,or the Tecplot home directory. When Tecplot starts it looks for this file in each of those directo-ries in turn. If Tecplot finds the file, it loads the macro definitions and associates functions to

    buttons on the Quick Macro Panel (in the Tools menu). You can have Tecplot load your ownmacro function file by using the -qmflag on the command line. The following command runsTecplot and installs the macro functions in the filemyteccmd.mcrinto the Quick MacroPanel:

    tecplot -qm myteccmd.mcr

    You can have a macro function add a button to the Quick Macro Panel. By default, all macro

    functions defined in the tecplot.mcrfile will add a button to the Quick Macro Panel, thosedefined elsewhere will not. See the $!MACROFUNCTIONcommand in Chapter 5, MacroCommands, for more information.

    If you want Tecplot to display the Quick Macro Panel at starting include the -showpanelflag on the command line.

    To see an example of a macro function file, look at the file tecplot.mcrlocated in the

    examples/mcrsub-directory below the Tecplot home directory. If this file is moved to the

    http://../um/macros.pdfhttp://../um/macros.pdf
  • 8/10/2019 Tecplot Reference Manual 1

    13/342

    7

    2.4. Running Macros from the Quick Macro Panel

    Tecplot home directory, the Quick Macro Panel will have options that include 3D RotationAnimation and Reset Center of Rotation.

  • 8/10/2019 Tecplot Reference Manual 1

    14/342

    Chapter 2. Managing Macros

    8

  • 8/10/2019 Tecplot Reference Manual 1

    15/342

    9

    CHAPTER 3 Macro CommandSyntax

    A macro file consists of one or more macro commands. Comments may be inserted any-where in the file, except within a character string. Comments start with an # (octothorp)and extend to the end of the line. The first line of a macro file contains a special comment

    that identifies the version number of the macro file. For Tecplot Version 10, this line is#!MC 1000.

    A Tecplot Version 10 macro file has the form:

    #!MC 1000

    . . .

  • 8/10/2019 Tecplot Reference Manual 1

    16/342

    Chapter 3. Macro Command Syntax

    10

    Each macrocommand, in turn, has the form:

    $!commandname[commandspecificmodifiers][mandatoryparameters][optionalparameters]

    where

    Spacing and capitalization for macro commands are, for the most part, not important. Thefollowing examples show different ways to enter the same macro command to set the widthand height for the custom1 paper:

    Example 1: $!PAPER

    commandspecificmodifiers These are optional command-specific modifiers. An exam-

    ple of a command that uses this is the $!FIELDcommand.The $!FIELDcommand can be followed by a set. If it isnot followed by a set, the $!FIELDcommand applies to allenabled zones. A supplied set in this case is used to limit thezones to which the $!FIELDcommand applies.

    mandatoryparameters commandparametercommandparameter...

    optionalparameters commandparametercommandparameter...

    commandparameter parameterassignmentorparametersubcommand.

    parameterassignment parameternameopvalue.

    op =or-=or+=or*=or/=.

    parametersubcommand parametername{optionalparameters}.

    commandname The name of a major command, such as REDRAW.

    parametername The name of a valid parameter for the previously namedmajor command. For example, the $!REDRAWmajor com-

    mand has an optional parameter called DOFULLDRAWING.value number, expression, orenumeratedvalue.

    number Any valid integer or double value representation.

    expression Any valid infix notation expression. The entire expressionmust itself be enclosed in parenthesis. For example (3+5).

    enumeratedvalue A key word that is unique to the variable being assigned avalue. For example, if the variable being assigned a value is

    a basic color then the enumerated value can be one of thefollowing: BLACK, RED, GREEN, BLUE, CYAN, YELLOW,PURPLE,WHITE, CUSTOM1through CUSTOM56.

  • 8/10/2019 Tecplot Reference Manual 1

    17/342

    11

    PAPERSIZEINFO{CUSTOM1{ WIDTH = 3}}

    Example 2: $!PAPER PAPERSIZEINFO

    {CUSTOM1{WIDTH = 3}}

    Example 3: $!paper papersizeinfo {custom1 {width = 3}}

  • 8/10/2019 Tecplot Reference Manual 1

    18/342

    Chapter 3. Macro Command Syntax

    12

  • 8/10/2019 Tecplot Reference Manual 1

    19/342

    13

    CHAPTER 4 Macro CommandSummary

    This chapter presents a brief list of the major macro commands in Tecplot. All major macrocommands are preceded by $! (dollar sign, exclamation mark).

    The macro commands fall into three basic categories: Control commands (Control in the Type column) deal with the flow of control within a

    Tecplot macro.

    Action commands (Action in the Type column) perform some type of visible action inTecplot like rotating an object or redrawing a frame, file input/output, or creating ordestroying objects within Tecplot.

    SetValue commands (FSV in the Type column refers to Frame SetValue commands; GSVto General SetValue) assign values to change the state of Tecplot. Some values changethe state of the current frame; others are more general and are used to change the settingsof the interface or hardcopy output from Tecplot. SetValue commands are hierarchical innature.

    Command Description Type

    $!ACTIVEFIELDZONES Change the set of active zones. FSV

    $!ACTIVELINEMAPS Change the set of active Line-maps. FSV

    $!ADDMACROPANELTITLE Add a title to the Quick Macro Panel. Action

    $!ADDONCOMMAND Execute command in an add-on. Action

    $!ALTERDATA Execute an equation to alter data. Action

    $!ANIMATECONTOURLEVELS Show an animation of contour levels. Action

    $!ANIMATEIJKBLANKING Show an animation of IJK-blanking. Action

    $!ANIMATEIJKPLANES Show an animation of IJK-planes. Action

    Chapter 4 Macro Command Summary

  • 8/10/2019 Tecplot Reference Manual 1

    20/342

    Chapter 4. Macro Command Summary

    14

    $!ANIMATESLICES Show an animation of currently defined slices. Action

    $!ANIMATESTREAM Show an animation of stream time marks ordashes.

    Action

    $!ANIMATELINEMAPS Show an animation of Line-mappings. Action

    $!ANIMATEZONES Show an animation of zones. Action

    $!ATTACHDATASET Attach a data set to the current frame. Action

    $!ATTACHGEOM Attach a geometry to the current frame. Action$!ATTACHTEXT Attach a text to the current frame. Action

    $!AVERAGECELLCENTERDATA Interpolate cell-centered data to cell nodes. Action

    $!BASICCOLOR Change the RGB values for basic colors. GSV

    $!BASICSIZE Change drop-down menu size defaults forthings like fonts, symbols, line thicknesses,and so forth.

    GSV

    $!BLANKING Change value or IJK-blanking settings. FSV

    $!BRANCHCONNECTIVITY Branch connectivity data from a zone. FSV

    $!BRANCHFIELDDATAVAR Branch a variable from sharing in a zone. FSV

    $!BREAK Break out of current $!LOOPor $!WHILE. Control

    $!COLORMAP Change the color map settings. GSV

    $!COLORMAPCONTROL Perform operations on the color map. Action

    $!COMPATIBILITY Backward compatibility settings. GSV

    $!CONTINUE Continue to end of current $!LOOPor$!WHILE. Control

    $!CONTOURLABELS Add or delete contour labels. Action

    $!CONTOURLEVELS Add, delete, or reset the contour levels. Action

    $!CREATECIRCULARZONE Create a circular or cylindrical zone (2-or 3-D).

    Action

    $!CREATECONTOURLINEZONES Create a zone or zones from contour lines. Action

    $!CREATEFEBOUNDARY Create an FE-boundary zone. Action

    $!CREATEFESURFACEFROMIORDERED Create an FE-surface from two or more I-Ordered zones.

    Action

    $!CREATEISOZONES Create iso-surface zones. Action

    $!CREATELINEMAP Create a Line-mapping. Action

    $!CREATEMIRRORZONES Create mirror-image zones. Action

    $!CREATENEWFRAME Create a new frame. Action

    $!CREATERECTANGULARZONE Create a rectangular or cubical zone

    (2- or 3-D).

    Action

    Command Description Type

  • 8/10/2019 Tecplot Reference Manual 1

    21/342

    15

    $!CREATESIMPLEZONE Create a simple zone. Action

    $!CREATESLICEZONEFROMPLANE Create a zone by slicing a volume zone. Action

    $!CREATESLICEZONES Create a new zone for each slice defined onthe Slice Details dialog.

    Action

    $!CREATESTREAMZONES Create streamtrace zones. Action

    $!DATASETUP Miscellaneous scratch data and Preplot setup. GSV

    $!DEFAULTGEOM Change the default geometry settings. GSV

    $!DEFAULTTEXT Change the default text settings. GSV

    $!DELAY Delay execution of Tecplot. Action

    $!DELETEAUXDATA Delete auxilary data attached to specifiedobject.

    Action

    $!DELETELINEMAPS Delete Line-mappings. Action

    $!DELETEVARS Delete variables. Action

    $!DELETEZONES Delete zones. Action

    $!DOUBLEBUFFER Enable or disable double buffering or swapbuffers.

    Action

    $!DRAWGRAPHICS Enable or disable drawing of graphics to thescreen.

    Action

    $!DROPDIALOG Drop a dialog (see $!LAUNCHDIALOG). Action

    $!DUPLICATELINEMAP Duplicate an Line-mapping. Action

    $!DUPLICATEZONE Duplicate a zone. Action$!ELSE Conditionally handle macro commands. Action

    $!ELSEIF Conditionally handle macro commands. Action

    $!ENDIF End of $!IF-$!ENDIFconstruct. Control

    $!ENDLOOP End of $!LOOP-$!ENDLOOPconstruct. Control

    $!ENDMACROFUNCTION End of $!MACROFUNCTION-$!ENDMACROFUNCTION construct.

    Control

    $!ENDWHILE End of$!WHILE-$!ENDWHILEconstruct. Control

    $!EXPORT Export the current plot to a file. Action

    $!EXPORTCANCEL Cancel the current export. Action

    $!EXPORTFINISH Signals completion of an animation sequence. Action

    $!EXPORTNEXTFRAME Records the next frame of an animation. Action

    $!EXPORTSETUP Change the file export settings. GSV

    $!EXPORTSTART Signals the start of an animation sequence. Action

    Command Description Type

    Chapter 4. Macro Command Summary

  • 8/10/2019 Tecplot Reference Manual 1

    22/342

    p y

    16

    $!EXTRACTFROMGEOM Extract data from points along a polylinegeometry.

    Action

    $!EXTRACTFROMPOLYLINE Extract data from a supplied polyline. Action

    $!FIELD Change the plot style settings for zones. FSV

    $!FIELDLAYERS Change the active layers for field plots. FSV

    $!FILECONFIG Change miscellaneous file path configurationsettings.

    GSV

    $!FONTADJUST Change intercharacter spacing, subscript, andsuperscript sizing, and so forth.

    GSV

    $!FRAMECONTROL Push, pop, or delete frames. Action

    $!FRAMELAYOUT Change size, position, and so forth of the cur-rent frame.

    FSV

    $!FRAMENAME Change the frame name. FSV

    $!FRAMESETUP Change miscellaneous default frame style set-

    tings.

    GSV

    $!GETAUXDATA Retrieve auxilary data from an object. Action

    $!GETCONNECTIVITYREFCOUNT Get the number of zone shared with a zone. Action

    $!GETCURFRAMENAME Get the name of the current frame. Action

    $!GETFIELDVALUE Get the field value at a specified point index,and assign it to .

    Action

    $!GETFIELDVALUEREFCOUNT Get the count of how many places a variable isshared.

    Action

    $!GETNODEINDEX Get the specified node index for finite-elementzones.

    Action

    $!GETVARLOCATION Returns the variable locaction. Node or Cell-Centered..

    Action

    $!GETVARNUMBYNAME Get the position of a variable. Action

    $!GETZONETYPE Get the zone type of specified zone. Action

    $!GLOBALCONTOUR Change global contour settings. FSV

    $!GLOBALFRAME Change miscellaneous global frame settings. GSV$!GLOBALISOSURFACE Change global attributes associated with iso-

    surfaces.FSV

    $!GLOBALLINEPLOT Change global Line-plot settings. FSV

    $!GLOBALPOLAR Change g lobal settings of polar plots FSV

    $!GLOBALRGB Change Global RGB coloring FSV

    $!GLOBALSCATTER Change global scatter settings. FSV

    Command Description Type

  • 8/10/2019 Tecplot Reference Manual 1

    23/342

    17

    $!GLOBALSLICE Change global attributes associated withslices.

    FSV

    $!GLOBALSTREAM Change global streamtrace settings. FSV

    $!GLOBALTHREED Change global 3-D settings. FSV

    $!GLOBALTHREEDVECTOR Change global 3-D vector settings. FSV

    $!GLOBALTWODVECTOR Change global 2-D vector settings. FSV

    $!IF Conditionally execute macro commands. Control

    $!INCLUDEMACRO Include macro commands from another file. Control

    $!INTERFACE Change interface settings. GSV

    $!INVERSEDISTINTERPOLATE Interpolate data using the inverse distancealgorithm.

    Action

    $!KRIG Interpolate data using kriging. Action

    $!LAUNCHDIALOG Launch a dialog (see $!DROPDIALOG). Action

    $!LIMITS Change limits for lines, text length, and con-tour levels.

    GSV

    $!LINEARINTERPOLATE Interpolate data using linear interpolation. Action

    $!LINEMAP Change plot style settings for Line-maps. FSV

    $!LINEPLOTLAYERS Turn Line-plot layers and features on or off. FSV

    $!LINKING Link attributes in two or more frames so thatchanges to attributes of one frame effect alllinked frames.

    FSV

    $!LOADADDON Load an add-on. Action

    $!LOADCOLORMAP Load a color map from a file. Action

    $!LOOP Begin a loop in a macro. Control

    $!MACROFUNCTION Begin definition of a macro function. Control

    $!NEWLAYOUT Clear the current layout and start over. Action

    $!OPENLAYOUT Open and read in a layout file. Action

    $!PAPER Change paper settings. GSV

    $!PAUSE Pause the macro and display a message. Action

    $!PICK Select and operate on objects. Action

    $!PLOTTYPE Change between view modes. FSV

    $!POLARAXIS Control axis setings for polar plots. FSV

    $!POLARTORECTANGULAR Convert coordinate variables from polar torectangular.

    Action

    $!POLARVIEW Set the extents of polar plots. GSV

    Command Description Type

    Chapter 4. Macro Command Summary

  • 8/10/2019 Tecplot Reference Manual 1

    24/342

    18

    $!PRINT Print the current layout to the system spooleror to a file.

    Action

    $!PRINTSETUP Change printing settings. GSV

    $!PROMPTFORFILENAME Launch a file selection dialog. Action

    $!PROMPTFORTEXTSTRING Launch a dialog containing a text string andoptional instructions.

    Action

    $!PROMPTFORYESNO Launch a dialog containing yes and nobuttons.

    Action

    $!PROPAGATELINKING Link multiple frames. FSV

    $!PUBLISH Create an HTML file displaying one or moreimages. A linked layout with packaged datamay be included.

    Action

    $!QUIT Quit Tecplot. Action

    $!RAWCOLORMAP Install a raw color map. Action

    $!READDATASET Load a data set by reading in one or more datafiles. Action

    $!READSTYLESHEET Read a stylesheet into the current frame. Action

    $!REDRAW Redraw the current frame. Action

    $!REDRAWALL Redraw all frames. Action

    $!REMOVEVAR Remove a user-defined macro variable. Control

    $!RENAMEDATASETVAR Rename a data set variable. Action

    $!RENAMEDATASETZONE Rename a data set zone. Action$!RESET3DAXES Reset the 3-D axes. Action

    $!RESET3DORIGIN Reset the 3-D origin to the centroid of thedata.

    Action

    $!RESET3DSCALEFACTORS Reset the 3-D axes scale factors Action

    $!RESETVECTORLENGTH Reset the vector length. Action

    $!ROTATE2DDATA Rotate 2-D data. This alters the data set. Action

    $!ROTATE3DVIEW Rotate a 3-D object. Action

    $!RUNMACROFUNCTION Run a macro function. Control

    $!SAVELAYOUT Save the layout to a file. Action

    $!SET3DEYEDISTANCE Set view distance from the current center ofrotation.

    FSV

    $!SETAUXDATA Add auxilary data to an object. GSV

    $!SETDATASETTITLE Set the data set title. Action

    Command Description Type

  • 8/10/2019 Tecplot Reference Manual 1

    25/342

    19

    $!SETFIELDVALUE Change the value of a field variable for a spe-cific index and zone.

    Action

    $!SETSTYLEBASE Set which attributes are used to build newframes.

    Action

    $!SHARECONNECTIVITY Share nodemaps between zones GSV

    $!SHAREFIELDDATAVAR Share variables between zones GSV

    $!SHIFTLINEMAPSTOBOTTOM Shift Line-mappings to the bottom (makingthem draw later). Action

    $!SHIFTLINEMAPSTOTOP Shift Line-mappings to the top (making themdraw earlier).

    Action

    $!SHOWMOUSEPOINTER Activate mouse icon within a macro. Action

    $!SKETCHAXIS Change sketch axis settings. FSV

    $!SMOOTH Smooth data. Action

    $!STREAMTRACE Add or delete streamtraces. Define the termi-

    nation line.

    Action

    $!SYSTEM Execute an operating system command. Action

    $!THREEDAXIS Change 3-D axis settings. FSV

    $!THREEDVIEW A SetValue command that changes globalattributes associated with the 3-D view.

    FSV

    $!TRANSFORMCOORDINATES Transform coordinates from one plot style toanother.

    FSV

    $!TRIANGULATE Create a new zone by triangulating data fromexisting zones.

    Action

    $!TWODAXIS Change 2-D axis settings. FSV

    $!VARSET Assign a value to a user-defined macro vari-able.

    Control

    $!VIEW Change the view in the current frame. Action

    $!WHILE Begin aWHILEloop in a macro. Control

    $!WORKSPACEVIEW Change the view of the frames in the work-

    space.

    Action

    $!WRITECOLORMAP Write the current color map to a file. Action

    $!WRITECURVEINFO Write coefficients or data points for curve fitsin XY-plots to a file.

    Action

    $!WRITEDATASET Write the data set for the current frame to afile.

    Action

    $!WRITESTYLESHEET Write a stylesheet for the current frame to afile.

    Action

    $!XYLINEAXIS Change XY-plot axis settings. FSV

    Command Description Type

    Chapter 4. Macro Command Summary

  • 8/10/2019 Tecplot Reference Manual 1

    26/342

    20

  • 8/10/2019 Tecplot Reference Manual 1

    27/342

    21

    CHAPTER 5 Macro Commands

    This chapter lists Tecplots macro commands alphabetically. Items within single anglebrackets (< >) are defined in either Chapter 7, Parameter Assignment Values, Expressions,and Arithmetic and Logical Operators, or Chapter 9, Raw Data.

    Items within double angle brackets (>) represent parameter sub-commands that are

    listed and described in Chapter 6, Parameter Subcommands.

    $!ACTIVEFIELDZONES

    Syntax: $!ACTIVEFIELDZONES

    [no parameters]

    Description: A SetValue command that changes the set of zones considered forplotting.

    Examples:

    Example 1: Make only zones 1, 3, 4 and 5 active for plotting:

    $!ACTIVEFIELDZONES = [1,3-5]

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    28/342

    22

    Example 2: Add zones 33, 34, 35 and 36 to the set of active zones:

    $!ACTIVEFIELDZONES + = [33-36]

    Example 3: Remove zones 1, 2, 3, 9, 10 and 11 from the set of active zones:

    $!ACTIVEFIELDZONES - = [1-3,9-11]

    $!ACTIVELINEMAPS

    Syntax: $!ACTIVELINEMAPS [no parameters]

    Description: A SetValue command that changes the set of line-mappings consideredfor plotting.

    Examples:Example 1: Make only line-mappings 1, 3, 4 and 5 active for plotting:

    $!ACTIVELINEMAPS = [1,3-5]

    Example 2: Add line-maps 33, 34, 35 and 36 to the set of active line-mappings:

    $!ACTIVELINEMAPS + = [33-36]

    Example 3: Remove line-maps 1, 2, 3, 9, 10 and 11 from the set of active line-mappings:

    $!ACTIVELINEMAPS - = [1-3,9-11]

    $!ADDMACROPANELTITLE

    Syntax: $!ADDMACROPANELTITLE [no parameters]

    Description: Add a title to the Quick Macro Panel.

    Example: The following example adds the title Bar Charts to the Quick MacroPanel:

  • 8/10/2019 Tecplot Reference Manual 1

    29/342

    23

    $!ADDMACROPANELTITLE "Bar Charts"

    $!ADDONCOMMAND

    Syntax: $!ADDONCOMMAND ADDONID=

    COMMAND= [optional parameters]

    Description: Send a command to an add-on. An add-on registers the name of afunction that will be called when an $!ADDONCOMMANDis processed.Tecplot knows which registered function to call based on the ADDONIDstring. See the function TecUtilMacroAddCommandCallbackinthe Tecplot ADK Reference Manual.

    Required Parameters:

    Optional Parameters:

    Example:Send the command GOto the add-on that has registered a commandprocessor with an add-on ID of XPROC:

    $!ADDONCOMMANDADDONID = "XPROC"COMMAND = "GO"

    Parameter Syntax Notes

    ADDONID = String that identifies the add-on. This must match thepublished ID string for the add-on.

    COMMAND = The command to be sent to the add-on.

    Parameter Syntax Default Notes

    NULL If the RAWDATAsection is supplied then each line of theRAWDATAsection is appended to the COMMANDstring. Aleading new line character is appended first, and each linein the RAWDATAsection will also be terminated with a

    new line (except for the last line).

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    30/342

    24

    $!ALTERDATA

    Syntax: $!ALTERDATA EQUATION =

    [optional parameters]

    Description: The ALTERDATAfunction operates on a data set within Tecplot usingFORTRAN-like equations. See 24.2, Data Alteration through

    Equations, in the Tecplot Users Manualfor more information on usingequations in Tecplot. The parameter, if specified, represents the setof zones on which to operate. If is omitted, all zones are affected.

    Required Parameter:

    Optional Parameters:

    Parameter Syntax Notes

    EQUATION = This assigns the equation to use to operate on the data.

    Parameter Syntax Default Notes

    IRANGE{MIN =

    MAX = SKIP = }

    1

    01

    See the note, Range Parameters, for information onspecifying range index values.

    JRANGE{MIN = MAX = SKIP = }

    101

    See the note, Range Parameters, for information onspecifying range index values.

    KRANGE{MIN = MAX = SKIP = }

    101

    See the note, Range Parameters, for information onspecifying range index values.

    http://../um/datamnp.pdfhttp://../um/datamnp.pdfhttp://../um/datamnp.pdfhttp://../um/datamnp.pdf
  • 8/10/2019 Tecplot Reference Manual 1

    31/342

    25

    RangeParameters

    The IRANGE, JRANGE, and KRANGEparameters are used to limit the data altered by theequation. The specification of range indices follow these rules:

    All indices start with 1 and go to some maximum index m.

    The number 0can be used to represent the maximum index m; specifying 0tells thecommand to go to the very last position of the range, that is, the maximum index value m.If the maximum index m = 15, specifying 0sets the range index to 15.

    Negative values represent the offset from the maximum index. If a value of -2 is speci-

    fied, and the maximum index mis 14, the value used is 14-2, or 12.

    Examples:

    Example 1: The following example adds one to X for all zones for every data point:

    $!ALTERDATAEQUATION = "x = x+1"

    Example 2: The following example creates a new, double precision variable calledDIST:

    $!ALTERDATAEQUATION = "{DIST} = SQRT(X**2 + Y**2)"DATATYPE = DOUBLE

    Example 3: The following equations set a variable called Pto zero along theboundary of an IJ-ordered zone:

    $!ALTERDATAEQUATION = "{P} = 0"IRANGE {MAX = 1}

    $!ALTERDATAEQUATION = "{P} = 0"IRANGE {MIN = 0}

    $!ALTERDATAEQUATION = "{P} = 0"

    DATATYPE = SINGLE Assign the precision given to the destination variable(that is, the variable on the left hand side of the equation).This only applies if the equation creates a new variable.(see Example 2).

    VALUELOCATION =

    AUTO Assign the location to destination variable.

    Parameter Syntax Default Notes

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    32/342

    26

    JRANGE {MAX = 1}

    $!ALTERDATAEQUATION = "{P} = 0"JRANGE {MIN = 0}

    $!ANIMATECONTOURLEVELS

    Syntax: $!ANIMATECONTOURLEVELS START= END = [optional parameters]

    Description: Produce an animation of a contour line plot by showing a single level at atime. The animation varies according to the currently defined contour

    levels and is limited by the values in the START, END, and SKIPparameters. To create an AVI or RM file, add $!EXPORTSETUPcommands before this command.

    Required Parameters:

    Optional Parameters:

    Example: The following command animates the first four contour levels to an AVIfile:

    $!EXPORTSETUP EXPORTFORMAT = AVI$!EXPORTSETUP EXPORTFNAME = "contourlevels.avi"$!ANIMATECONTOURLEVELS

    Parameter Syntax Notes

    START = Starting contour level number to animate.

    END = Ending contour level number to animate.

    Parameter Syntax Default Notes

    SKIP = 1 Level skip.

    CREATEMOVIEFILE = FALSE If TRUE, must be preceded by

    $!EXPORTSETUPcommands.

  • 8/10/2019 Tecplot Reference Manual 1

    33/342

    27

    START = 1

    END = 4 CREATEMOVIEFILE = TRUE

    $!ANIMATEIJKBLANKING

    Syntax: $!ANIMATEIJKBLANKINGNUMSTEPS = [optional parameters]

    Description: Produce an animation of different IJK-blankings in your plot. Theanimation starts at one IJK-blanking setting and marches throughintermediate steps to a second setting. To create an AVI or RM file, add$!EXPORTSETUPcommands before this command.

    Required Parameter:

    Optional Parameters:

    Parameter Syntax Notes

    NUMSTEPS = Number of intermediate steps for the animation.

    Parameter Syntax Default Notes

    IMINFRACT = 0.1 Minimum fraction for blanking at the start ofanimation for the I-index. Actual I-index isequal toIMINFRACT*IMAX.

    JMINFRACT = 0.1 Minimum fraction for blanking at the start ofanimation for the J-index. Actual J-index isequal toJMINFRACT*JMAX.

    KMINFRACT = 0.1 Minimum fraction for blanking at the start ofanimation for the K-index. Actual K-index isequal toKMINFRACT*KMAX.

    IMAXFRACT = 1.0 Maximum fraction for blanking at the start ofanimation for the I-index. Actual I-index isequal toIMAXFRACT*IMAX.

    JMAXFRACT = 1.0 Maximum fraction for blanking at the start ofanimation for the J-index. Actual J-index isequal toJMAXFRACT*JMAX.

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    34/342

    28

    Example: The following example produces an animation showing a band of I-

    planes traversing the entire data field:$!ANIMATEIJKBLANKING

    NUMSTEPS = 6IMINFRACT = 0.1JMINFRACT = 0.0KMINFRACT = 0.0IMAXFRACT = 1.0JMAXFRACT = 1.0

    KMAXFRACT = 1.0IMINFRACT2 = 1.0JMINFRACT2 = 0.0KMINFRACT2 = 0.0IMAXFRACT2 = 1.0JMAXFRACT2 = 1.0KMAXFRACT2 = 1.0

    KMAXFRACT = 1.0 Maximum fraction for blanking at the start ofanimation for the K-index. Actual K-index isequal toKMAXFRACT*KMAX.

    IMINFRACT2 = 0.8 Minimum fraction for blanking at the end ofanimation for the I-index. Actual I-index isequal toIMINFRACT*IMAX.

    JMINFRACT2 = 0.8 Minimum fraction for blanking at the end ofanimation for the J-index. Actual J-index is

    equal to JMINFRACT*JMAX.KMINFRACT2 = 0.8 Minimum fraction for blanking at the end of

    animation for the K-index. Actual K-index isequal to KMINFRACT*KMAX.

    IMAXFRACT2 = 1.0 Maximum fraction for blanking at the end ofanimation for the I-index. Actual I-index isequal toIMAXFRACT*IMAX.

    JMAXFRACT2 = 1.0 Maximum fraction for blanking at the end ofanimation for the J-index. Actual J-index is

    equal toJMAXFRACT*JMAX.KMAXFRACT2 = 1.0 Maximum fraction for blanking at the end of

    animation for the K-index. Actual K-index isequal toKMAXFRACT*KMAX.

    CREATEMOVIEFILE = FALSE If TRUE, must be preceded by$!EXPORTSETUPcommands.

    Parameter Syntax Default Notes

  • 8/10/2019 Tecplot Reference Manual 1

    35/342

    29

    $!ANIMATEIJKPLANES

    Syntax: $!ANIMATEIJKPLANES START= END = [optional parameters]

    Description: Produce an animation that cycles through I-, J- or K-planes in an IJK-ordered data set. To create an AVI or RM file, add $!EXPORTSETUPcommands before this command.

    Required Parameters:

    Optional Parameters:

    Example: The following example generates an animation of the I-planes 1, 3, 5, 7and 9:

    $!ANIMATEIJKPLANESPLANES = I

    START = 1END = 9SKIP = 2

    Parameter Syntax Notes

    START = Starting plane index.

    END = Ending plane index.

    Parameter Syntax Default Notes

    PLANES = I Specify I, J or K.

    SKIP = 1 Index skip.

    CREATEMOVIEFILE = FALSE If TRUE, must be preceded by$!EXPORTSETUPcommands.

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    36/342

    30

    $!ANIMATELINEMAPS

    Syntax: $!ANIMATELINEMAPS START= END= [optional parameters]

    Description: Produce an animation of one Line-mapping at a time. To create an AVI or

    RM file, add $!EXPORTSETUPcommands before this command.

    Required Parameters:

    Optional Parameters:

    Example: The following example creates an animation showing plots of Line-maps2, 4, 6, 8 and 10:

    $!ANIMATELINEMAPSSTART = 2END = 10SKIP = 2

    $!ANIMATESLICES

    Syntax: $!ANIMATESLICES START=

    Parameter Syntax Notes

    START = Starting Line-map number.

    END = Ending Line-map number.

    Parameter Syntax Default Notes

    SKIP = 1 Line-map skip.

    CREATEMOVIEFILE = FALSE If TRUE, must be preceded by$!EXPORTSETUPcommands.

  • 8/10/2019 Tecplot Reference Manual 1

    37/342

    31

    END= [optional parameters]

    Description: The macro command $!ANIMATESLICESuses the currently definedstart and end slice position. Use $!GLOBALSLICEto set these positions;$!ANIMATESLICESthen redefines how many intermediate slices are tobe used, then animates a sub-set of those slices. To create an AVI or RMfile, add $!EXPORTSETUPcommands before this command.

    Required Parameters:

    Optional Parameters:

    Example: The following example creates an animation of 3-D slices:

    $!ANIMATESLICES START = 1

    END = 30

    NUMSLICES = 30

    Parameter Syntax Default Notes

    START = Start and end indices are based on the set of slicesgenerated by NUMSLICES. All slices between startand end are animated. There is no skipping. Toobtain the effect of skipping, change the value forNUMSLICES.

    END = Start and end indices are based on the set of slicesgenerated by NUMSLICES. All slices between startand end are animated. There is no skipping. Toobtain the effect of skipping, change the value forNUMSLICES.

    NUMSLICES = 2 Number of slices to distribute between the start andend slice locations as defined by POSITION1andPOSITION2in $!GLOBALSLICE.

    Parameter Syntax Default Notes

    CREATEMOVIEFILE =

    FALSE If TRUE, must be preceded by$!EXPORTSETUPcommands.

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    38/342

    32

    $!ANIMATESTREAM

    Syntax: $!ANIMATESTREAM[optionalparameters]

    Description: Produce an animation of stream markers or dashes, moving along thecurrently defined streamtrace paths. To create an AVI or RM file, add$!EXPORTSETUPcommands before this command.

    Optional Parameters:

    Example: The following example animates streamtraces for five cycles with eachcycle using ten steps:

    $!ANIMATESTREAMSTEPSPERCYCLE = 10NUMCYCLES = 5

    $!ANIMATEZONES

    Syntax: $!ANIMATEZONES START= END= [optional parameters]

    Parameter Syntax Default Notes

    STEPSPERCYCLE = 10 Number of steps to use for each cycle of theanimation. Increase this number to produce asmoother animation.

    NUMCYCLES = 4 Number of cycles in the animation. Each cycle

    shows stream markers or dashes, movingalong a streamtrace path. If DT is thestreamtrace delta time, then at the end of thecycle, the markers or dashes will have moved(2*DT*(STEPSPERCYCLE-1))/(STEPSPERCYCLE)in time.

    CREATEMOVIEFILE =

    FALSE If TRUE, must be preceded by$!EXPORTSETUPcommands.

  • 8/10/2019 Tecplot Reference Manual 1

    39/342

    33

    Description: Produce an animation showing one zone at a time. To create an AVI or

    RM file, add $!EXPORTSETUPcommands before this command.

    Required Parameters:

    Optional Parameters:

    Example: The following example animates just the first five zones:

    $!ANIMATEZONESSTART = 1END = 5

    $!ATTACHDATASET

    Syntax: $!ATTACHDATASET[optional parameter]

    Description: Attach the current frame to the data set of another frame. This commandis usually found only in layout files generated by Tecplot. Note that the

    $!FRAMEMODEcommand automatically executes an$!ATTACHDATASETcommand if a frame mode is requested in a framethat does not have an attached data set. Tecplot attaches the data set fromthe closest frame (in drawing order) having an attached data set.

    Parameter Syntax Notes

    START = Starting zone number.

    END = Ending zone number.

    Parameter Syntax Default Notes

    SKIP = 1 Zone skip.

    CREATEMOVIEFILE = FALSE If TRUE, must be preceded by$!EXPORTSETUPcommands.

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    40/342

    34

    Optional Parameter:

    Examples:

    Example 1: The following example attaches to the current frame the data set from thesecond frame drawn when doing a Redraw All:

    $!ATTACHDATASETFRAME = 2

    Example 2: The following example attaches to the current frame the data set from theframe drawn next-to-last when doing a Redraw All:

    $!ATTACHDATASET

    $!ATTACHGEOM

    Syntax: $!ATTACHGEOM

    [optional parameters]

    Description: Attach a geometry to the current frame.

    Required Parameter:

    ParameterSyntax Default Notes

    FRAME = numframes-1 Frames are numbered 1 to numframes, based on the order theyare drawn when a Redraw All is executed.

    Parameter Syntax Notes

    This is the data which defines the size and relative shapeof the geometry. This must be at the end of the commandafter any other parameters.

  • 8/10/2019 Tecplot Reference Manual 1

    41/342

    35

    Optional Parameters:

    Parameter Syntax Default Notes

    POSITIONCOORDSYS = GRID

    ANCHORPOS = This assigns the anchor position of the geometry.

    ZONE = 1 This is only used if ATTACHTOZONE=TRUE. Thisgeometry is disabled if the zone assigned here isinactive.

    ATTACHTOZONE = FALSE If TRUE, must include ZONE.

    COLOR = BLACK

    CLIPPING = CLIPTTO-VIEWPORT

    FILLCOLOR = WHITE

    ISFILLED =

    GEOMTYPE = LINESEGS

    LINEPATTERN = SOLID

    PATTERNLENGTH = 2% Set the pattern length in Y-frame units (0-100).

    LINETHICKNESS = 0.1% Set the line thickness in Y-frame units (0-100).

    NUMELLIPSEPTS = 72 Numbers of points to use when drawing ellipsesand circles.

    ARROWHEADSTYLE =

    PLAIN

    ARROWHEADATTACHMENT =

    NONE

    ARROWHEADSIZE = 5% Set the arrowhead size in Y-frame units (0-100).

    ARROWHEADANGLE = 12 Set the angle for arrowheads (in degrees).

    SCOPE = LOCAL Set the scope to GLOBALto draw this geometry inall like frames.

    MACROFUNCTIONCOMMAND=

    Null Set the macro command to execute when you hoverover the geometry and press Ctrl-right-click.

    For security reasons this command can only beused in the Tecplot configuration file.

    DRAWORDER= AFTERDATA

    IMAGEFILENAME=

    MAINTAINASPECTRATIO=

    TRUE

    RESIZEFILTER= TEXTURE-FILTER

    Default = CUBIC

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    42/342

    36

    Examples:

    Example 1: The following example creates a red circle, with a radius equal to 25percent of the height of the frame, in the center of the frame:

    $!ATTACHGEOMPOSITIONCOORDSYS = FRAMEANCHORPOS{X = 50Y = 50}GEOMTYPE = CIRCLECOLOR = REDRAWDATA25

    Example 2: The following example creates an L-shaped polyline with an arrowhead atthe end:

    $!ATTACHGEOMPOSITIONCOORDSYS = FRAMEANCHORPOS{X = 20Y = 80}GEOMTYPE = LINESEGS

    ARROWHEADATTACHMENT = ATENDRAWDATA130 00 -6040 0

    $!ATTACHTEXT

    Syntax: $!ATTACHTEXTTEXT =

    [optional parameters]

  • 8/10/2019 Tecplot Reference Manual 1

    43/342

    37

    Description: Attach text to the current frame.

    Required Parameter:

    Optional Parameters:

    Parameter Syntax Notes

    TEXT = Text string to draw.

    Parameter Syntax Default Notes

    ANCHORPOS = This assigns the anchor position for the text. Unitsare dependent on POSITIONCOORDSYS.

    POSITIONCOORDSYS = FRAME

    CLIPPING= CLIPTO-VIEWPORT

    ZONE = 1 This is only used if ATTACHZONE = TRUE. Thistext is disabled if the zone assigned here is inactive.

    ATTACHTOZONE = FALSE If TRUE, must include ZONE.

    COLOR = BLACK

    TEXTSHAPE{FONT = SIZEUNITS = HEIGHT =

    }

    HELVBOLDPOINT14

    The following combinations of SIZEUNITSandPOSITIONCOORDSYSare allowed:FRAME/FRAME, POINT/FRAMEGRID/GRID, FRAME/GRID.

    BOX{BOXTYPE=

    LINETHICKNESS = MARGIN = COLOR = FILLCOLOR = }

    NONE0.1%20BLACK

    WHITE

    The margin is the space between the text and box.The margin is measured in terms of the percentageof the text height.

    ANGLE = 0.0 Text angle (in degrees).

    ANCHOR = LEFT Specifies what part of the text to anchor to theframe.

    LINESPACING = 1.0 Line spacing to use if text contains multiple lines.

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    44/342

    38

    Examples:

    Example 1: The following example creates the text ABCand positions it in the lowerleft corner of the frame:

    $!ATTACHTEXTTEXT = "ABC"

    Example 2: The following example creates the text TEXT AT AN ANGLEand

    places it in the center of the frame. The text is drawn at an angle of 45degrees:

    $!ATTACHTEXTTEXT = "TEXT AT AN ANGLE"ANGLE = 45XYPOS {X=50 Y=50}

    Example 3: The following example creates the text TIMES-ROMANusing the Times

    Roman font. This text includes a text box:

    $!ATTACHTEXTTEXT = "TIMES-ROMAN"FONT = TIMESBOX{BOXTYPE = PLAINMARGIN = 20

    }XYPOS {X=20 Y=20}

    SCOPE = LOCAL Set the scope to GLOBALto include this text in alllike frames.

    MACROFUNCTIONCOMMAND=

    Null Set the macro command to execute when youhover over the geometry and press Ctrl-right-click.

    For security reasons this command can only beused in the Tecplot configuration file.

    Parameter Syntax Default Notes

  • 8/10/2019 Tecplot Reference Manual 1

    45/342

    39

    $!BASICCOLOR

    Syntax: $!BASICCOLOR [optional parameters]

    Description: A SetValue command that sets the red, green and blue components forany of the basic colors in Tecplot.

    Optional Parameters:

    Example: Set the CUSTOM8color to be brown:

    $!BASICCOLORCUSTOM8{R = 165G = 42B = 42}

    $!BASICSIZE

    Syntax: $!BASICSIZE[optional parameters]

    Parameter Syntax Notes

    BLACK

    RED

    GREEN

    BLUE

    CYAN

    YELLOW

    PURPLE

    WHITE

    CUSTOM1...CUSTOM56

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    46/342

    40

    Description: A SetValue command that sets sizes of various objects like line

    thicknesses, line pattern length, font height, and so forth. Sizes can beassigned when interacting with Tecplot by either entering an exact valueor by choosing from a preset list of values. The $!BASICSIZEcommand allows you to change the values in the preset lists.

    Optional Parameters:

    Example: Change the medium line pattern length to be 2.5 percent:

    $!BASICSIZELINEPATLENGTHS{MEDIUM = 2.5

    }

    $!BLANKING

    Syntax: $!BLANKING[optional parameters]

    Description: A SetValue command that changes settings for IJK- or value-blanking.

    Parameter

    Syntax NotesLINETHICKNESSES

    TICKLENGTHS

    SYMBOLSIZES

    LINEPATLENGTHS

    ARROWHEADSIZES

    POINTTEXTSIZES

    FRAMETEXTSIZES

  • 8/10/2019 Tecplot Reference Manual 1

    47/342

    41

    Optional Parameters:

    Examples:

    Example 1: Set IJK-blanking to cut away the minimum index corner:

    $!BLANKINGIJK{

    Parameter Syntax Notes

    IJK{INCLUDEIJKBLANKMODEIMINFRACTJMINFRACTKMINFRACT

    IMAXFRACTJMAXFRACTKMAXFRACTZONE}

    =

    =

    Minimum and maximum fractions are in terms ofpercentages (0-100). Zero represents an index ofone and 100 the maximum index.

    Only one zone can be assigned to use IJK-blank-ing.

    VALUE{VALUEBLANKCELLMODEBLANKENTIRECELL

    INCLUDECONSTRAINT nnn { INCLUDE RELOP CONSTRAINTOP2MODE VALUECUTOFF VARA VARB SHOW

    COLOR LINEPATTERN PATTERNLENGTH LINETHICKNESS }}

    = =

    =

    = = = = = = =

    = = = =

    Set to FALSEto get precision-blanking.

    Set to FALSEto turn off all value-blanking.Use to specify which constraint tomodify.

    DEPTH{INCLUDEFROMFRONT

    FROMBACK}

    = =

    =

    If TRUE, draws only those portions at the plotwith depth values within the FROMFRONTandFROMBACKlimits. FROMFRONTand FROM-BACKare expressed as percentages of the overall

    3-D depth.

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    48/342

    42

    INCLUDE = YESIMINFRACT = 0JMINFRACT = 0KMINFRACT = 0IMAXFRACT = 50JMAXFRACT = 50KMAXFRACT = 50}

    Example 2: Use value-blanking to cut away all cells that have at least one node where

    variable 3 is less than or equal to 7.5:$!BLANKINGVALUE{ INCLUDE = YES CONSTRAINT 1 { INCLUDE = YES

    VARA = 3 RELOP = LESSTHANOREQUAL VALUECUTOFF = 7.5 }}

    $!BRANCHCONNECTIVITY

    Syntax: $!BRANCHCONNECTIVITYZONE =

    [no optional parameters]

    Description: For zones where connectivity is shared, this command allows forbranching of connectivity information from the specified zone.

    Required Parameters:

    ParameterSyntax Notes

    ZONE =

  • 8/10/2019 Tecplot Reference Manual 1

    49/342

    43

    Example: Suppose Zones 2, 3 and 4 share connectivity. This command branches

    the connectivity of the second zone. Zones 3 and 4 will still shareconnectivity.

    $!BRANCHCONNECTIVITYZONE = 2

    $!BRANCHFIELDDATAVAR

    Syntax: $!BRANCHFIELDDATAVARZONE = VAR = [no optional parameters]

    Description: Allows for branching of specified variable in the specified zone for zonesthat share variables.

    Required Parameters:

    Example: Assume Zones 1, 2 and 4 share variables 3 and 5. This commandbranches the third variable from the second zone. Variable 3 will still beshared by zones 1 and 4, while variable 5 will still be shared by all threezones.:

    $!BRANCHFIELDDATAVARZONE = 2

    VAR = 3

    ParameterSyntax Notes

    ZONE =

    VAR =

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    50/342

    44

    $!BREAK

    Syntax: $!BREAK

    [no parameters]

    Description: Jump out of the current $!LOOP-ENDLOOPor$!WHILE-$!ENDWHILE.

    Example: $!LOOP 5...

    $!BREAK...

    $!ENDLOOP

    $!COLORMAP

    Syntax: $!COLORMAP [optional parameters]

    Description: A SetValue command that changes the settings for the global contour

    color map and the global light source shading color map in Tecplot.Changes here affect all frames using these color maps. See$!GLOBALCONTOUR COLORMAPFILTERfor additional settings thatcan be applied on a frame-by-frame basis.

    Optional Parameters:

    Parameter Syntax Notes

    TWOCOLOR

    SMRAINBOW

    LGRAINBOW

    MODERN

    GRAYSCALE

    USERDEFINED

  • 8/10/2019 Tecplot Reference Manual 1

    51/342

    45

    Example: Make the third control point for the small rainbow color map to bepositioned 0.44 of the way across the color map. Set the leading andtrailing RGB red value to 90:

    $!COLORMAPSMRAINBOW{CONTROLPOINT 3{ COLORMAPFRACTION = 0.44 LEADRGB {R = 90}

    TRAILRGB {R = 90}}}

    $!COLORMAPCONTROL[Required-Control Option]

    Description: The different commands in the COLORMAPCONTROLcompound functionfamily are described separately in the following sections.

    The COLORMAPCONTROLcompound functions are:

    $!COLORMAPCONTROL REDISTRIBUTECONTROLPOINTS$!COLORMAPCONTROL COPYSTANDARD$!COLORMAPCONTROL RESETTOFACTORY

    $!COLORMAPCONTROL REDISTRIBUTECONTROLPOINTS

    Syntax: $!COLORMAPCONTROL REDISTRIBUTECONTROLPOINTS[no parameters]

    USERDEFINED NUMCONTROLPOINTS =

    CONTOURCOLORMAP

    Parameter Syntax Notes

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    52/342

    46

    Description: Redistribute the control points for the currently active color map so they

    are evenly spaced across the color map. This is equivalent to clickingRedistribute Control Points in the Color Map dialog. Note that this doesnot change the RGB values assigned at each control point.

    Example: $!COLORMAPCONTROLREDISTRIBUTECONTROLPOINTS

    $!COLORMAPCONTROL COPYSTANDARD

    Syntax: $!COLORMAPCONTROL COPYSTANDARDCONTOURCOLORMAP =

    Description: Preset either the user-defined color map or the raw user-defined colormap to be a copy of one of the standard color maps. Tecplot mustcurrently be using either the user-defined color map or the raw user-

    defined color map in order to use this function.

    Required Parameter:

    Example: The following example sets the current color map to be a copy of thesmall rainbow color map:

    $!COLORMAPCONTROL COPYSTANDARDCONTOURCOLORMAP = SMRAINBOW

    $!COLORMAPCONTROL RESETTOFACTORY

    Syntax: $!COLORMAPCONTROL RESETTOFACTORY[no parameters]

    Description: Redistribute the control points and reset the RGB values for the currentlyactive color map. This is equivalent to clicking Reset on the Color Mapdialog.

    Parameter Syntax Notes

    CONTOURCOLORMAP = The color map to copy.

  • 8/10/2019 Tecplot Reference Manual 1

    53/342

    47

    Example: $!COLORMAPCONTROL RESETTOFACTORY

    $!COMPATIBILITY

    Syntax: $!COMPATIBILITY[optional parameters]

    Description: Allow datasharing access and setting, without warning.

    Optional Parameters:

    Example: The following commands turn on datasharing:

    $!COMPATIBILITY ALLOWDATASHARING=TRUE

    $!CONTINUE

    Syntax: $!CONTINUE

    Description: Transfer control back to nearest $!LOOPor $!WHILE.

    Example: $!LOOP 10...

    $!CONTINUE

    Parameter Syntax Default Notes

    ALLOWDATASHARING = TRUE If FALSE, Tecplot will not allow

    data sharing. This may be neces-sary to use older add-ons that can-not handle shared data.

    USEV10TEXTFORMATTING = TRUE If FALSE, allows Tecplot to dis-play text subscripts and super-scripts created with older Tecplotversions without automatically con-verting the text to the new format-ting.

    Chapter 5. Macro Commands

  • 8/10/2019 Tecplot Reference Manual 1

    54/342

    48

    .

    .

    .

    $!ENDLOOP

    $!CONTOURLABELS[Required-Control Option]

    Description: The different commands in the CONTOURLABELScompound function

    family are described separately in the following sections.The CONTOURLABELScompound functions are:

    $!CONTOURLABELS ADD$!CONTOURLABELS DELETEALL

    $!CONTOURLABELS ADD

    Syntax: $!CONTOURLABELS ADD[optional parameters]

    Description: Add contour labels to your plot.

    Optional Parameters:

    Example: The following commands add labels at (0.5, 0.25) and (0.73, 0.17) in a

    ParameterSyntax Default Notes

    XYZPOS{X = Y = Z = }

    0.00.00.0

    X-position for contour label.Y-position for contour label.Z-position for contour label (use Z only for 3-D plots).

    ISALIGNED =

    TRUE If TRUEthen align the contour label along the contour line;if FALSE, draw the label horizontally.

    CONTOURGROUP=

    1 Defines which contour group is changed.

  • 8/10/2019 Tecplot Reference Manual 1

    55/342

    49

    2-D field plot. The labels will be aligned:

    $!CONTOURLABELS ADDCONTOURGROUP = 2XYZPOS{X = 0.5Y = 0.25}

    $!CONTOURLABELS ADD

    XYZPOS{X = 0.73Y = 0.17}

    $!CONTOURLABELS DELETEALL

    Syntax: $!CONTOURLABELS DELETEALL[optional parameters]

    Description: Delete all currently defined contour labels.

    Optional Parameters:

    Example: $!CONTOURLABELS DELETEALL

    CONTOURGROUP = 3

    $!CONTOURLEVELS[Required-Control Option]

    Description: The different commands in the CONTOURLEVELScompound function

    family are described separately in the following sections.

    ParameterSyntax Default Notes

    CONTOURGROUP =

    1 Defines which contour group is changed.

    Chapter 5. Macro Commands

    The CONTOURLEVELS compound functions are:

  • 8/10/2019 Tecplot Reference Manual 1

    56/342

    50

    The CONTOURLEVELScompound functions are:

    $!CONTOURLEVELS ADD$!CONTOURLEVELS NEW$!CONTOURLEVELS DELETENEAREST$!CONTOURLEVELS DELETERANGE$!CONTOURLEVELS RESET$!CONTOURLEVELS RESETTONICE

    $!CONTOURLEVELS ADD

    Syntax: $!CONTOURLEVELS ADD

    [optional parameters]

    Description: Add a new set of contour levels to the existing set of contour levels.Required Parameter:

    Optional Parameters:

    Example: Add contour levels 1.7, 3.4 and 2.9 to the plot:

    $!CONTOURLEVELS ADDRAWDATA31.73.42.9

    Parameter Syntax Notes

    Supply a list of contour levels to add.

    ParameterSyntax Default Notes

    CONTOURGROUP =

    1 Defines which contour group is changed.

  • 8/10/2019 Tecplot Reference Manual 1

    57/342

    51

    $!CONTOURLEVELS DELETENEAREST

    Syntax: $!CONTOURLEVELS DELETENEARESTRANGEMIN =

    [optional parameters]

    Description: Delete the contour level whose value is nearest the value supplied in theRANGEMINparameter.

    Required Parameter:

    Optional Parameters:

    Example: Delete the contour level whose value is nearest to 3.4:

    $!CONTOURLEVELS DELETENEARESTRANGEMIN = 3.4

    $!CONTOURLEVELS DELETERANGE

    Syntax: $!CONTOURLEVELS DELETERANGERANGEMIN = RANGEMAX =

    [optional parameters]

    Description: Delete all contour levels between a minimum and maximum contourvalue (inclusive).

    Parameter Syntax Notes

    RANGEMIN = Delete the contour level whose value is nearest to thisvalue.

    ParameterSyntax Default Notes

    CONTOURGROUP =

    1 Defines which contour group is changed.

    Chapter 5. Macro Commands

    Required Parameters:

  • 8/10/2019 Tecplot Reference Manual 1

    58/342

    52

    Required Parameters:

    Optional Parameters:

    Example: Delete all contour levels between 0.1 and 0.7:

    $!CONTOURLEVELS DELETERANGE

    RANGEMIN = 0.1RANGEMAX = 0.7

    $!CONTOURLEVELS NEW

    Syntax: $!CONTOURLEVELS NEW

    [optional parameters]

    Description: Replace the current set of contour levels with a new set.

    Required Parameter:

    Parameter Syntax Notes

    RANGEMIN = Minimum contour level to delete.

    RANGEMAX = Maximum contour level to delete.

    ParameterSyntax Default Notes

    CONTOURGROUP =

    1 Defines which contour group is changed.

    Parameter Syntax Notes

    Supply a list of contour levels to add.

    Optional Parameters:

  • 8/10/2019 Tecplot Reference Manual 1

    59/342

    53

    Optional Parameters:

    Example: Replace the current set of contour levels with the levels 0.5, 0.75 and 1.0:

    $!CONTOURLEVELS NEWRAWDATA30.50.751.0

    $!CONTOURLEVELS RESET

    Syntax: $!CONTOURLEVELS RESETNUMVALUES = [optional parameters]

    Description: Reset the contour levels to a set of evenly distributed values spanning theentire range of the currently selected contouring variable.

    Required Parameter:

    Optional Parameters:

    ParameterSyntax Default Notes

    CONTOURGROUP =

    1 Defines which contour group is changed.

    Parameter Syntax Notes

    NUMVALUES = New number of contour levels.

    ParameterSyntax Default Notes

    CONTOURGROUP =

    1 Defines which contour group is changed.

    Chapter 5. Macro Commands

    Example: Reset the contour levels to use 150 levels:

  • 8/10/2019 Tecplot Reference Manual 1

    60/342

    54

    $!CONTOURLEVELS RESETNUMVALUES = 150

    $!CONTOURLEVELS RESETTONICE

    Syntax: $!CONTOURLEVELS RESETTONICEAPPROXNUMVALUES = [optional parameters]

    Description: Reset the contour levels to a set of evenly distributed, nice valuesspanning the entire range of the currently selected contouring variable,with a specified number of entries.

    Required Parameter:

    Optional Parameters:

    Example: Reset the contour levels to use 150 levels:

    $!CONTOURLEVELS RESETTONICEAPPROXNUMVALUES = 10

    Parameter Syntax Notes

    APPROXNUMVALUES = Approximate number of contour levels desired. Actualvalue may be different.

    ParameterSyntax Default Notes

    CONTOURGROUP =

    1 Defines which contour group is changed.

  • 8/10/2019 Tecplot Reference Manual 1

    61/342

    55

    $!CREATECIRCULARZONE

    Syntax: $!CREATECIRCULARZONEIMAX =JMAX =

    [optional parameters]

    Description: Create a circular (or cylindrical) IJ- or IJK-ordered zone.

    Required Parameters:

    Optional Parameters:

    Examples:

    Example 1: Create a circular 10 by 20 IJ-ordered zone centered at (5, 5) with a radiusof 2:

    $!CREATECIRCULARZONEIMax = 10JMax = 20X = 5Y = 5RADIUS = 2

    Example 2: Create a cylindrical 5 by 6 by 8 IJK-ordered zone with the bottom

    Parameter Syntax Notes

    IMax = Radial direction.

    JMax = Circumferential direction, must be greater than 3.

    Parameter Syntax Default Notes

    KMax = 1 Bottom to top direction

    X = 0 X-coordinate for center.

    Y = 0 Y-coordinate for center.

    Z1 = 0 Z-minimum if a cylinder is created.

    Z2 = 1 Z-maximum if a cylinder is created.

    RADIUS = 1

    DATATYPE = SINGLE

    Chapter 5. Macro Commands

    centered at (4, 4, 0) and the top centered at (4, 4, 7) and a radius of 3:

  • 8/10/2019 Tecplot Reference Manual 1

    62/342

    56

    $!CREATECIRCULARZONEIMax = 5JMax = 6KMax = 8X = 4Y = 4Z1 = 0Z2 = 7RADIUS = 3

    $!CREATECONTOURLINEZONES

    Syntax: $!CREATECONTOURLINEZONES[optional parameters]

    Description: Create zones from the currently-defined contour lines. One zone can becreated from each contour level in that plot, or one zone for everypolyline can be generated..

    Optional Parameter:

    Example: Create a new zone for each contour line on an existing contour plot.

    $!CREATECONTOURLINEZONES

    CONTLINECREATEMODE = ONEZONEPERCONTOURLEVEL

    $!CREATEFEBOUNDARY

    Syntax: $!CREATEFEBOUNDARY

    Parameter Syntax Notes

    CONTLINECREATEMODE= [ONEZONEPERCONTOURLEVEL orONEZONEPERINDEPENDENTPOLYLINE

    Select whether one zone per contour lever will be createdor whether there will be a zone for each polyline.

    SOURCEZONE =

  • 8/10/2019 Tecplot Reference Manual 1

    63/342

    57

    [optional parameters]

    Description: Zone boundaries for finite element data cannot be turned on or off usingthe boundary plot layer in Tecplot. You can, however, create a separatezone which is the boundary of a finite element zone. This new zone canthen be turned on or off. One requirement for this function to workcorrectly is that adjacent cells must share the same node points along theircommon boundary.

    Required Parameter:

    Optional Parameter:

    Example: Create an FE-boundary zone from zone 3:

    $!CREATEFEBOUNDARY

    SOURCEZONE = 3

    $!CREATEFESURFACEFROMIORDERED

    Syntax: $!CREATEFESURFACEFROMIORDEREDSOURCEZONES =

    [optional parameters]

    Description: A FE-Surface zone can be generated from two or more I-Ordered zones.To get the best possible output, it is recomended that the source zonesshould have their nodes arranged in a similar manner so that theconnecting lines between points are as straightforward as possible. For

    Parameter Syntax Notes

    SOURCEZONE = Zone to extract the boundary from.

    Parameter Syntax Default Notes

    REMOVEBLANKEDSURFACES =

    FALSE Set to TRUEif you want the resulting zone toinclude only the boundary adjacent to non-blanked cells.

    Chapter 5. Macro Commands

    this reason, indices from source zones should increase in the samedirection

  • 8/10/2019 Tecplot Reference Manual 1

    64/342

    58

    direction.

    Required Parameter:

    Optional Parameter:

    Example: Create an FE-Surface zone from zones 3 and 4:

    $!CREATEFESURFACEFROMIORDEREDSOURCEZONES = [3-4]

    $!CREATEISOZONES

    Syntax: $!CREATEISOZONES

    [no parameters]

    Description: Create zones from the currently defined iso-surfaces. One zone will becreated from each defined iso-surface. The iso-surfaces must be activeand you must have at least one active volume zone.

    Example: $!CREATEISOZONES

    $!CREATELINEMAP

    Syntax: $!CREATELINEMAP [no parameters]

    Parameter Syntax Notes

    SOURCEZONES = Zones whose points will be used to create the new sur-face.

    Parameter Syntax Default Notes

    CONNECTSTARTTOEND =

    FALSE TRUEallows for closed surfaces.

    Description: Create a new Line-mapping.

  • 8/10/2019 Tecplot Reference Manual 1

    65/342

    59

    Example: $!CREATELINEMAP

    $!CREATEMIRRORZONES

    Syntax: $!CREATEMIRRORZONESSOURCEZONES =

    [optional parameters]

    Description: Create new zones that are mirror images of the source zones

    Required Parameter:

    Optional Parameter:

    Example: Create a mirror of zones 2-4 across the Y-axis (that is, mirror the X-variable) in 2D frame mode:

    $!CREATEMIRRORZONESSOURCEZONES = [2-4]MIRRORVAR = X

    $!CREATENEWFRAME

    Syntax: $!CREATENEWFRAME[optional parameters]

    Description: Creates a new frame.

    Parameter Syntax Notes

    SOURCEZONES = Zone(s) to create mirror zone(s) from.

    Parameter Syntax Default Notes

    MIRRORVAR = X This variable in the new zone is multiplied by 1after thezone is copied.

    Chapter 5. Macro Commands

    Optional Parameters:

  • 8/10/2019 Tecplot Reference Manual 1

    66/342

    60

    Note: The default position and size of the initial frame created when Tecplot starts up can bechanged in the Tecplot configuration file.

    Example: The following example creates a 5- by 5-inch frame with the upper lefthand corner of the frame positioned 2 inches from the left edge of thepaper and 1 inch from the top:

    $!CREATENEWFRAMEXYPOS{X = 2Y = 1}

    WIDTH = 5HEIGHT = 5

    $!CREATERECTANGULARZONE

    Syntax: $!CREATERECTANGULARZONE[optional parameters]

    Description: Create a rectangular zone. If no data set exists when this command isexecuted, a data set is created with variables X, Y (and Z, if KMax > 1).If a data set exists prior to this command, the non-coordinate variables forthe zone created are initialized to zero.

    ParameterSyntax Default Notes

    XYPOS{X = Y = }

    1.00.25

    X-position (inches) relative to the left edge of the paper.Y-position (inches) relative to the top edge of the paper.

    WIDTH = 9 Units are in inches.

    HEIGHT = 8 Units are in inches.

    Optional Parameters:

  • 8/10/2019 Tecplot Reference Manual 1

    67/342

    61

    Example: Create a rectangular IJ-ordered zone dimensioned 20 by 30 where X

    ranges from 0 to 3 and Y from 3 to 9:

    $!CREATERECTANGULARZONEIMax = 20JMax = 30X1 = 0Y1 = 3X2 = 3Y2 = 9

    $!CREATESIMPLEZONE

    Syntax: $!CREATESIMPLEZONE[optional parameters]

    Description: Create a new zone by specifying only a list of XY-pairs of data. If otherzones exist prior to using this function and there are more than 2variables, then the additional variables are also created and set to zero.

    Parameter Syntax Default Notes

    IMax = 1 I-dimension.

    JMax = 1 J-dimension.

    KMax = 1 K-dimension.

    X1 = 0 X-minimum.

    Y1 = 0 Y-minimum.

    Z1 = 0 Z-minimum.

    X2 = 1 X-maximum.

    Y2 = 1 Y-maximum.

    Z2 = 1 Z-maximum.

    DATATYPE = SINGLE

    Chapter 5. Macro Commands

    Required Parameter:

  • 8/10/2019 Tecplot Reference Manual 1

    68/342

    62

    Optional Parameter:

    Example: Create a simple XY-zone that has the XY-pairs (1, 0), (2, 1), (3, 7) and (59):

    $!CREATESIMPLEZONERAWDATA41 02 13 75 9

    $!CREATESLICEZONEFROMPLANE

    Syntax: $!CREATESLICEZONEFROMPLANE [optional parameters]

    Description: Create a new zone as a slice through existing 3-D volume zones. Use$!GLOBALTHREEDto define the slicing plane orientation.

    Parameter Syntax Notes

    See Chapter 9, Raw Data, for details.

    Parameter

    Syntax Default NotesDATATYPE = SINGLE

    Optional Parameters:

  • 8/10/2019 Tecplot Reference Manual 1

    69/342

    63

    Example: Create a slice zone atX=0:

    $!GLOBALTHREEDSLICE{ORIGIN {X=0}NORMAL{ X=1 Y=0 Z=0

    }}$!CREATESLICEZONEFROMPLANE

    SLICESOURCE=VOLUMEZONES

    $!CREATESLICEZONES

    Syntax: $!CREATESLICEZONES[no parameters]

    Description: Create a new zone for each slice defined on the Slice Details dialog. Onlycreates slices from volume zones.

    Example: $!GLOBALSLICE POSITION1 {X = 6}$!GLOBALCONTOUR VAR = 4$!GLOBALSLICE SHOW = YES$!GLOBALSLICE POSITION2 {X = 1}$!GLOBALSLICE SHOWPOSITION2 = YES$!GLOBALSLICE SHOWINTERMEDIATESLICES = YES$!GLOBALSLICE NUMINTERMEDIATESLICES = 6$!REDRAW

    Parameter Syntax Default Notes

    SLICESOURCE= VOLUMEZONES

    FORCEEXTRACTIONTOSINGLE-ZONE=

    TRUE

    Chapter 5. Macro Commands

    $!CREATESLICEZONES

  • 8/10/2019 Tecplot Reference Manual 1

    70/342

    64

    $!CREATESTREAMZONES

    Syntax: $!CREATESTREAMZONES[optional parameters]

    Description: Create one or more zones out of the currently defined streamtraces. Thenew zones have the same number of variables per data point as the otherzones in the data set with all non-coordinate variables interpolated at thepositions along the streamtrace.

    Optional Parameter:

    Example: Create a single zone out of all common streamzones:

    $!CREATESTREAMZONESCONCATENATE = TRUE

    $!DATASETUP

    Syntax: $!DATASETUP [optional parameters]

    Description: A SetValue command that sets miscellaneous parameters related to data.

    Parameter Syntax Default Notes

    CONCATENATE = FALSE Set to TRUEto create a single zone out of all commonstreamtraces. The cell that connects the end of onestreamtrace with the beginning of the next can later beturned off using value-blanking.

    Optional Parameters:

  • 8/10/2019 Tecplot Reference Manual 1

    71/342

    65

    Example: Change the arguments used to Preplot ASCII files so only zones 1, 2 and3 are processed:

    $!DATASETUPPREPLOTARGS = "-zonelist 1:3"

    $!DEFAULTGEOM

    Syntax: $!DEFAULTGEOM

    [optional parameters]

    Description: A SetValue command that sets the attributes for the default geometry.When a geometry is created interactively, its color, line thickness, and soforth, are preset based on the default geometry. This command is usuallyused only in the Tecplot configuration file.

    Optional Parameters:

    ParameterSyntax Notes

    SCRATCHDATAFIELDTYPE = Set the data type for scratch arrays used for geometriesline segments and other lines. The default is SINGLEforWindows and DOUBLEfor UNIX. This parameter canonly be used in the Tecplot configuration file.

    PREPLOTARGS = Arguments used to run the internal Preplot utility. The

    internal version of Preplot is used to convert ASCII data-files when they are read directly into Tecplot. See Sec-tion 4.5, ASCII Data File Conversion to Binary, in theTecplot Users Manualfor more information on Preplotand its options.

    Parameter Syntax Notes

    ANCHORPOS

    POSITIONCOORDSYS =

    SCOPE =

    ZONE =

    ATTACHTOZONE =

    Chapter 5. Macro Commands

    COLOR =

    Parameter Syntax Notes

    http://../um/bdatfmt.pdfhttp://../um/bdatfmt.pdf
  • 8/10/2019 Tecplot Reference Manual 1

    72/342

    66

    Example: Make the default geometry line thickness 0.2 percent:

    $!DEFAULTGEOMLINETHICKNESS = 0.2

    $!DEFAULTTEXT

    Syntax: $!DEFAULTTEXT [optional parameters]

    Description: A SetValue command that sets the attributes for the default text. Whentext is added to a plot interactively, its font, color, size, and so forth, arebased on the default text. This command is usually used only in the

    Tecplot configuration file.

    Optional Parameters:

    COLOR =

    FILLCOLOR =

    ISFILLED =

    LINEPATTERN =

    PATTERNLENGTH

    LINETHICKNESS

    NUMELLIPSEPTS

    ARROWHEADSTYLE =

    ARROWHEADATTACHMENT =

    ARROWHEADSIZE

    ARROWHEADANGLE

    MACROFUNCTIONCOMMAND = Set the macro command to execute when youhover over the geometry and press Ctrl-right-click.

    Parameter Syntax Notes

    ANCHORPOS

    POSITIONCOORDSYS =

    Parameter Syntax Notes

  • 8/10/2019 Tecplot Reference Manual 1

    73/342

    67

    Example:Make the default text font

    TIMESBOLDwith a character height of 14

    points:

    $!DEFAULTTEXTTEXTSHAPE{FONT = TIMESBOLDSIZEUNITS = POINTHEIGHT = 14

    }

    $!DELAY

    Syntax: $!DELAY [no parameters]

    Description: Delay Tecplot execution for seconds.

    Example: Pause Tecplot for 3 seconds:

    $!DELAY 3

    SCOPE =

    ZONE

    ATTACHTOZONE =

    CLIPPING =

    COLOR =

    ANGLE

    ANCHOR = LINESPACING

    TEXTSHAPE

    BOX

    MACROFUNCTIONCOMMAND = Set the macro command to execute when you hoverover the geometry and press Ctrl-right-click.

  • 8/10/2019 Tecplot Reference Manual 1

    74/342

    Description: Delete one or more Line-mappings. If is omitted then all Line-

    mappings are deleted

  • 8/10/2019 Tecplot Reference Manual 1

    75/342

    69

    mappings are deleted.Example: Delete Line-mappings 2, 3, 4 and 8:

    $!DELETELINEMAPS [2-4,8]

    $!DELETEVARS

    Syntax: $!DELETEVARS [no parameters]

    Description: Delete one or more variables.

    Example: Delete variables 4 and 10:

    $!DELETEZONES [4,10]

    $!DELETEZONES

    Syntax: $!DELETEZONES [no parameters]

    Description: Delete one or more zones.

    Example: Delete zones 3, 7, 8, 9 and 11:

    $!DELETEZONES [3,7-9,11]

    $!DOUBLEBUFFER[Required-Control Option]

    Description: The different commands in the DOUBLEBUFFERcompound functionfamily are described separately in the following sections.

    The DOUBLEBUFFERcompound functions are:

    $!DOUBLEBUFFER OFF

    Chapter 5. Macro Commands

    $!DOUBLEBUFFER ON$!DOUBLEBUFFER SWAP

  • 8/10/2019 Tecplot Reference Manual 1

    76/342

    70

    $!DOUBLEBUFFER OFF

    Syntax: $!DOUBLEBUFFER OFF[no parameters]

    Description: Turn off double buffering; use this command once at the end of asequence of using the double buffer.

    Example: See $!DOUBLEBUFFER SWAP

    $!DOUBLEBUFFER ON

    Syntax: $!DOUBLEBUFFER ON[no parameters]

    Description: Turn on double buffering; use this command once at the beginning of asequence of using the double buffer. While double buffering is turned onall drawing is sent to the back buffer.

    Example: See$!DOUBLEBUFFER SWAP

    $!DOUBLEBUFFER SWAP

    Syntax: $!DOUBLEBUFFER SWAP[no parameters]

    Description: Swap the back buffer to the front. In other words, copy the image in theback buffer to the front.

    Example: The following example uses the double buffer to show the rotation of a3-D object:

    $!DOUBLEBUFFER ON$!LOOP 10

    $!ROTATE3DVIEW X

  • 8/10/2019 Tecplot Reference Manual 1

    77/342

    71

    ANGLE = 5$!REDRAW$!DOUBLEBUFFER SWAP$!ENDLOOP$!DOUBLEBUFFER OFF

    $!DRAWGRAPHICS

    Syntax: $!DRAWGRAPHICS [no parameters]

    Description: Turn on or off all graphics drawing. Turning off all graphics duringpreliminary portions of a macro file can greatly increase the efficiency ofthe macro.

    Example: Turn off all graphics drawing:

    $!DRAWGRAPHICS NO

    $!DROPDIALOG

    Syntax: $!DROPDIALOG [no parameters]

    Description: Drop a Tecplot interface dialog when can be one ofCOLORMAP, EQUATION, PLOTATTRIBUTES, QUICKEDIT,QUICKMACROPANELor MACROVIEWER. This command is mainly

    useful for the Tecplot demo. To launch a dialog use $!LAUNCHDIALOG.

    Example: $!DROPDIALOG MACROVIEWER

    Chapter 5. Macro Commands

    $!DUPLICATELINEMAP

    S t

  • 8/10/2019 Tecplot Reference Manual 1

    78/342

    72

    Syntax: $!DUPLICATELINEMAPSOURCEMAP = DESTINATIONMAP =

    Description: Copy attributes from an existing Line-mapping to another.

    Required Parameters:

    Example: Copy attributes of Line-mapping 3 to Line-mapping 7:

    $!DUPLICATELINEMAPSOURCEMAP = 3DESTINATIONMAP = 7

    $!DUPLICATEZONE

    Syntax: $!DUPLICATEZONESOURCEZONE =

    [optional parameters]

    Description: Make a copy of an existing zone. You can assign index ranges to create anew zone which is a subset of the source zone.

    Required Parameter:

    Parameter Syntax Notes

    SOURCEMAP = Line-mapping from which to copy.

    DESTINATIONMAP = The destination can either be the number of an existingmap or 1 greater than the current number of maps. If youchoose the latter, a new Line-mapping will be created.

    Parameters Syntax Notes

    SOURCEZONE = Zone to duplicate (the source zone).

    Optional Parameters:

    Parameters

  • 8/10/2019 Tecplot Reference Manual 1

    79/342

    73

    Examples:

    Example 1: Make a complete copy of zone 2:

    $!DUPLICATEZONESOURCEZONE = 2

    Example 2: Duplicate zone 3 creating a zone which uses only the I-index range from2 to 7 from the source zone:

    $!DUPLICATEZONESOURCEZONE = 3IRANGE{MIN = 2

    MAX = 7}

    a a e e sSyntax Default Notes

    IRANGE{MIN = MAX = SKIP = }

    101

    See notes on index ranges for $!ALTERDATAactioncommand.

    JRANGE{MIN = MAX = SKIP = }

    101

    See notes on index ranges for $!ALTERDATAactioncommand.

    KRANGE{MIN = MAX = SKIP = }

    101

    See notes on index ranges for $!ALTERDATAactioncommand.

    Chapter 5. Macro Commands

    $!ELSE

    Syntax: $!ELSE

  • 8/10/2019 Tecplot Reference Manual 1

    80/342

    74

    Syntax: $!ELSE[no parameters]

    Description: Conditionally handle macro commands. Used when an $!IFstatement isFALSE.

    Example: $!VARSET |C| = 2

    $!IF |C| == 5 $!CREATENEWFRAMEXYPOS

    {X = 2.5Y = 1.5}

    WIDTH = 4HEIGHT = 4

    $!ELSE$!CREATENEWFRAME

    XYPOS{X = 3Y = 2}

    WIDTH = 3HEIGHT = 3

    $!ENDIF

    $!ELSEIF

    Syntax: $!ELSEIF Description: Conditionally handle macro commands. Used to create multiple options

    for statements should an $!IFstatement be FALSE.

    Example: $!VARSET |A| = 2$!IF |A| < 5 $!CREATENEWFRAME

    XYPOS{

    X = 1Y = 1

  • 8/10/2019 Tecplot Reference Manual 1

    81/342

    75

    }WIDTH = 3HEIGHT = 3

    $!ELSEIF |A| > 5 $!CREATENEWFRAME

    XYPOS{X = 2Y = 1}

    WIDTH = 5HEIGHT = 5

    $!ELSE $!CREATENEWFRAME

    XYPOS

    {X = 3Y = 3}

    WIDTH = 9HEIGHT = 9

    $!ENDIF

    $!EXPORT

    Syntax: $!EXPORT[no parameters]

    Description: Export an image file from Tecplot. See the $!EXPORTSETUPcommand

    for details on setting up the exported image type. The $!EXPORTcommand is not valid for animation formats. (AVI and Raster Metafile.)

    Example: $!EXPORTSETUP EXPORTFORMAT = PNG$!EXPORT

    Chapter 5. Macro Commands

    $!EXPORTCANCEL

    Syntax: $!EXPORTCANCEL

  • 8/10/2019 Tecplot Reference Manual 1

    82/342

    76

    Syntax: $!EXPORTCANCEL[no parameters]

    Description: Cancel out of the current export animation sequence. The animation filebeing generated is removed.

    Example: $!EXPORTCANCEL

    $!EXPORTFINISH

    Syntax: $!EXPORTFINISH[no parameters]

    Description: Signals the completion of an animation sequence and causes theanimation file to be created. You must call $!EXPORTSTARTprior tousing $!EXPORTFINISH. This command is only valid for animationformats. (AVI and Raster Metafile.) You may use the|EXPORTISRECORDING|intrinsic variable to make sure that ananimation sequence has been initiated.

    Example: $!EXPORTSETUP EXPORTFNAME="rotate.avi" EXPORTFORMAT=AVI$!EXPORTSTART$!LOOP 5$!ROTATE3DVIEW X ANGLE=5$!EXPORTNEXTFRAME$!ENDLOOP$!IF "|EXPORTISRECORDING|" =="YES" $!EXPORTFINISH$!ENDIF

    $!EXPORTNEXTFRAME

    Syntax: $!EXPORTNEXTFRAME

  • 8/10/2019 Tecplot Reference Manual 1

    83/342

    77

    Syntax: $!EXPORTNEXTFRAME[no parameters]

    Description: Records the next frame of an animation. You must call$!EXPORTSTARTprior to calling $!EXPORTNEXTFRAME. Thiscommand is only valid for animation formats. (AVI and Raster Metafile.

    You may use the |EXPORTISRECORDING|intrinsic variable to makesure that an animation sequence has been initiated.)

    Example: $!EXPORTSETUP EXPORTFNAME="rotate.avi" EXPORTFORMAT=AVI$!EXPORTSTART$!LOOP 5$!ROTATE3DVIEW X ANGLE=5$!EXPORTNEXTFRAME$!ENDLOOP$!EXPORTFINISH

    $!EXPORTSETUP

    Syntax: $!EXPORTSETUP [optional parameters]

    Description: A SetValue command that sets the attributes for exporting image filesfrom Tecplot. Exporting is usually intended as a means to transfer imagesfrom Tecplot to be imported by other applications. See $!PRINTSETUP

    and $!PRINTfor generating output intended for printers and plotters.

    Optional Parameters:

    Parameter Syntax Notes

    EXPORTFNAME =

    EXPORTFORMAT =

  • 8/10/2019 Tecplot Reference Manual 1

    84/342

    $!EXPORTSTART

    Syntax: $!EXPORTSTART

  • 8/10/2019 Tecplot Reference Manual 1

    85/342

    79

    Syntax: $!EXPORTSTART[no parameters]

    Description: Signals the start of an animation sequence and records the first frame ofthe animation. This command is only valid for animation formats. (AVIand Raster Metafile.)

    Example: $!EXPORTSETUP EXPORTFNAME="rotate.avi" EXPORTFORMAT=AVI$!EXPORTSTART$!LOOP 5$!ROTATE3DVIEW X ANGLE=5$!EXPORTNEXTFRAME$!ENDLOOP$!EXPORTFINISH

    $!EXTRACTFROMGEOM

    Syntax: $!EXTRACTFROMGEOM[optional parameters]

    Description:Extract data from a 2- or 3-D field plot. The locations at which to extractthe data come from a polyline geometry that must be picked prior toissuing this command.

    Optional Parameters

    Parameters Syntax Default Notes

    EXTRACTLINEPOINTSONLY =

    FALSE If FALSE, must include NUMPTS.

    INCLUDEDISTANCEVAR = FALSE If TRUE,then Tecplot includes an extra variablein the result which is the distance along the line ofpoints extracted and EXTRACTTOFILEmustalso be TRUE.

    Chapter 5. Macro Commands

    NUMPTS = --- Required if EXTRACTLINEPOINTSONLYisFALSE.

    EXTRACTTOFILE FALSE If FALSE a zone is created If TRUE must

    Parameters Syntax Default Notes

  • 8/10/2019 Tecplot Reference Manual 1

    86/342

    80

    Example: Extract 20 points from along the currently picked geometry. Send the

    result to a file called extract.dat:$!EXTRACTFROMGEOM

    NUMPTS = 20EXTRACTTOFILE = TRUEFNAME = "extract.dat"

    $!EXTRACTFROMPOLYLINE

    Syntax: $!EXTRACTFROMPOLYLINE[optional parameters]

    Description: Extract data from a 2- or 3-D field plot. The locations of where to extract

    the data from come from a supplied polyline in the form of.

    Optional Parameters

    EXTRACTTOFILE = FALSE If FALSE, a zone is created. If TRUE, mustinclude FNAME.

    FNAME = --- File name for extracted file. Required ifEXTRACTTOFILEis TRUE.

    Parameters Syntax Default Notes

    EXTRACTTHROUGHVOLUME =

    FALSE If TRUE,data is extracted from XYZ-coordinatesin the polyline. If FALSE,data is extracted from

    the surface.EXTRACTLINEPOINTSONLY =

    FALSE If FALSE, must include NUMPTS.

    INCLUDEDISTANCEVAR = FALSE If TRUE,Tecplot includes an extra variable in theresult which is the distance along the line of pointsextracted and EXTRACTOFILEmust also be TRUE.

    NUMPTS = --- Required if EXTRACTLINEPOINTSONLYisFALSE.

    EXTRACTTOFILE = FALSE If FALSE, a zone is created. If TRUE, you mustinclude FNAME.

    Parameters Syntax Default Notes

  • 8/10/2019 Tecplot Reference Manual 1

    87/342

    81

    Example: Extract 10 points from specific locations in a field plot. Create a zonewith the extracted data:

    $!EXTRACTFROMPOLYLINEEXTRACTLINEPOINTSONLY = TRUERAWDATA100 0 01 2 02 4 03 2 03 4 04 4 04 5 04 6 05 7 06 9 0

    $!FIELD

    Syntax: $!FIELD [][optional parameters]

    Description: A SetValue command that assigns zone attributes for field plots. Theparameter immediately following the $!FIELDcommand is

    optional. If is omitted then the assignment is applied to all zones.Otherwise the assignment is applied only to the zones specified in .

    FNAME = --- File name for extracted file. Required ifEXTRACTTOFILEis TRUE.

    Chapter 5. Macro Commands

    Optional Parameters:

    Parameter Syntax NotesMESH{

  • 8/10/2019 Tecplot Reference Manual 1

    88/342

    82

    {SHOWMESHTYPECOLORLINEPATTERNPATTERNLENGTHLINETHICKNESS}

    = = = =

    CONTOUR{SHOWCONTOURTYPECOLORLINEPATTERNPATTERNLENGTHLINETHICKNESSUSELIGHTINGEFFECTFLOODCOLORINGLINECONTOURGROUP}

    = = = = = = =

    VECTOR{SHOWVECTORTYPEARROWHEADSTYLECOLORISTANGENTLINEPATTERNPATTERNLENGTHLINETHICKNESS}

    = = = = = = = =

    SCATTER{SHOWCOLORFILLMODEFILLCOLORSIZEBYVARIABLE

    FRAMESIZELINETHICKNESSSYMBOLSHAPE}

    = = = = =

    Scatter sizing variable must be defined beforethis can be set to TRUE. See the $!GLO-BALSCATTERcommand.Size of symbols when SIZEBYVARIABLEis FALSE.

    POINTS{IJKSKIP

    Parameter Syntax Notes

  • 8/10/2019 Tecplot Reference Manual 1

    89/342

    83

    Examples:

    Example 1: Change the contour plot type to flood for zones 1-12:

    $!FIELD [1-12]CONTOUR{CONTOURTYPE = FLOOD

    POINTSTOPLOT}

    j

    Limits the number of vectors or scatter sym-bols drawn.

    SHADE{SHOWCOLOR

    USELIGHTINGEFFECT}

    =

    =

    =

    BOUNDARY{SHOWIBOUNDARYJBOUNDARYKBOUNDARYCOLORLINETHICKNESS

    }

    =

    =

    =

    =

    =

    =

    Applies for IJ-, IK-, and IJK-ordered zones.Applies for IJ-, JK-, and IJK-ordered zones.Applies for IK-, JK-, and IJK-ordered zones.

    SURFACEEFFECTS{SURFACETRANSLUCENCYUSETRANSLUCENCYLIGHTINGEFFECT}

    =

    =

    =

    When reading in older layouts, FLOOD-TRANSLUCENCYis ignored if SHADE layeris on for that zone, otherwise it is converted toSURFACETRANSLUCENCY. In a macro, thisis ignored. SURFACETRANSLUCENCYrangeis one to 99.

    SURFACES{SURFACESTOPLOT

    IRANGEJRANGEKRANGE}

    =

    = =

    =

    VOLUMEMODEapplies to volume zones, withthe exception that POINTSTOPLOTalsoapplies to finite-element surface zones.

    VOLUMEMODE{VOLUMEOBJECTSTOPLOT}

    =

    GROUP =

    Chapter 5. Macro Commands

    }

    Example 2: Change the mesh color to red for all zones:

    $!FIELDMESH{

  • 8/10/2019 Tecplot Reference Manual 1

    90/342

    84

    {COLOR = RED}

    $!FIELDLAYERS

    Syntax: $!FIELDLAYERS[optional parameters]

    Description: A SetValue command that turns field plot layers on or off, or sets the 2-Ddraw order.

    Optional Parameters:

    Example: Turn on the