Contents Previous Next Subchapters

Running a Tecplot Macro String
Syntax tpmacrostring(macro)
See Also tpmacrofile

Description
Executes a Tecplot macro that is defined by the character row vector macro.

Examples
If you enter,
   clear
   tpopen
   tpplot(1:0.2:10)
   tpmacrostring("$!LINEMAP [1] NAME = 'MyMap'")
Tecplot will generate a line plot and then change the name of the first line map to 'MyMap'.

Many Tecplot macros require that arguments to the macro be on separate lines, but the tpmacrostring functions require that the macro command sent to Tecplot be a character vector. These types of commands can be constructed as in the following example. Note that multiple line macros can be combined into a single line as illustrated in this example, but the tpmacrostring command can only execute one macro at a time. If you enter,
   clear
   tpopen
   mlmode sombrero.m
   Z = sombrero(20)
   tpsurface(Z)
O-Matrix will use the mlmode function sombrero to create the following surface plot.



If you continue the example by entering
   cmd = ["$!CONTOURLEVELS RESETTONICE", NEW_LINE,"  CONTOURGROUP = 1", NEW_LINE, "  APPROXNUMVALUES = 3"]
   tpmacrostring(cmd)
O-Matrix will run a Tecplot macro to re-scale the number of contour levels to 3 and update the surface plot to look like,