Contents Previous Next Subchapters

Obtaining a Variable Name from Variable Number
Syntax name = tpvarname(variable)
See Also tpvarnum , tpzonename , tpzonenum , tpmapcount

Returns the Tecplot variable name for the given variable number. The argument variable must be a positive integer scalar. The return value name is a character row vector that specifies the name of the requested variable. If the return value name equals " " then the requested variable does not exist in the current data set.

If you enter
   fName = [OM_INSTALL,"\example\tecplot\rainfall.plt"] 
Tecplot will open the rainfall sample file from your distribution and print "Dallas Rainfall" which is the name for variable number 3. You can use the tpvarname function to determine all of the variable names in a file. If you continue the example above by entering
   ix = 1
   while( tpvarname(ix) <> " ") begin
      print tpvarname(ix)
      ix = ix+1
O-Matrix will echo the following
Seattle Rainfall 
Dallas Rainfall 
Miami Rainfall 
Error 1 
Error 2