Utilities


Functions

Boolean_t TecUtilDoubleBuffer (DoubleBufferAction_e DoubleBufferAction)
 Implements a double buffer action as described below by the DoubleBufferAction parameter definitions.
void TecUtilWorkAreaSuspend (Boolean_t DoSuspend)
 Suspends or un-suspends updates to the work area only.
void TecUtilInterfaceSuspend (Boolean_t DoSuspend)
 Suspends or un-suspends updates to the interface only (not including the status line).
void TecUtilStatusSuspend (Boolean_t DoSuspend)
 Suspends or un-suspends updates to the status line only.
Boolean_t TecUtilQuit (void)
 Terminate the execution of the Tecplot program.
char * TecUtilGetBasePath (const char *FName)
 Get the base path of a file name.
Boolean_t TecUtilPublish (const char *FName, Boolean_t IncludeLayoutPackage, ImageSelection_e ImageSelection)
 Write out an html file and related image files.
Boolean_t TecUtilWriteCurveInfo (const char *FName, EntIndex_t XYMapNum, ProcessXYMode_e ProcessXYMode)
Boolean_t TecUtilDelay (LgIndex_t Seconds)
 Delay Tecplot execution for a specified time.
Boolean_t TecUtilSystem (const char *Command, Boolean_t Wait)
 Instruct Tecplot to submit and execute an operating system specific command.
Boolean_t TecUtilImageRGBBitmapCreate (BitDumpRegion_e Region)
 Call this function to initialize the export state if you are exporting using the RGB functions.
Boolean_t TecUtilImageIndexedBitmapCreate (BitDumpRegion_e Region, short *RedColorTable_Array, short *GreenColorTable_Array, short *BlueColorTable_Array)
 Call this function to initialize the export state if you are exporting using the index functions.
void TecUtilImageBitmapDestroy (void)
 Destroy the bitmap buffer.
Boolean_t TecUtilImageGetDimensions (short *Width, short *Height)
 Gets the image dimensions.
Boolean_t TecUtilImageRGBGetScanLine (short ScanLine, short *Red_Array, short *Green_Array, short *Blue_Array)
 Gets the RGB values of a scan line.
Boolean_t TecUtilImageIndexedGetScanLine (short ScanLine, short *RGBIndex_Array)
 Gets the color table indices for a scan line.
void TecUtilImageGetColorTable (Byte_t *Red_Array, Byte_t *Green_Array, Byte_t *Blue_Array)
 Get the color table, that is, the palette, of a color-reduced image.
Boolean_t TecUtilImageBitmapCreateX (ArgList_pa ArgList)
 Create a true color or color-reduced bitmap of a specified width.
Boolean_t TecUtilTimerAddCallback (UInt32_t Interval, ArbParam_t ClientData, AddOnTimerCallback_pf TimerCallback)
 Adds a timer callback, a function which is called by Tecplot at a set interval of time.
Boolean_t TecUtilOnIdleQueueAddCallback (OnIdleCallback_pf Callback, ArbParam_t ClientData)
 Adds the function to a list of functions that Tecplot calls only one time when Tecplot is in an idle state.
Boolean_t TecUtilFileDownloadURL (const char *SourceURL, const char *LocalDestinationFile, Boolean_t IsAscii, Boolean_t ConfirmOverwrite)
 Download a file given a valid URL.
Boolean_t TecUtilFileUploadURL (const char *LocalSourceFile, const char *DestinationURL, Boolean_t IsAscii, Boolean_t ConfirmOverwrite)
 Upload a file given a valid URL.
Boolean_t TecUtilFileIsURL (const char *URLFName)
 Convenience function that will determine if a supplied string uses valid URL syntax.
void TecUtilArrayDealloc (void **Array)
 Deallocates an array that was allocated and given to an add-on by Tecplot and assigns the pointer to NULL.
Boolean_t TecUtilQuitAddQueryCallback (MopupQueryAddOnCallback_pf QuitQueryCallback)
 Include a function in the list of functions to call when Tecplot is considering shutting down.
void TecUtilDispatchWorkAreaEvent (int I, int J, int ButtonOrKey, Event_e Event, Boolean_t IsShifted, Boolean_t IsAlted, Boolean_t IsControlled)
 Dispatches a Tecplot work area event to the Tecplot engine.
void TecUtilToolbarActivate (Boolean_t Activate)
 Specifies whether to show the Tecplot toolbar ore not.
void TecUtilLockOn (void)
 Lock Tecplot.
void TecUtilLockOff (void)
 Unlock Tecplot.
void TecUtilLockStart (AddOn_pa AddOn)
 Lock Tecplot.
void TecUtilLockFinish (AddOn_pa AddOn)
 Unlock Tecplot.
char * TecUtilLockGetCurrentOwnerName (void)
 Queries for and returns the name of the object currently locking Tecplot.
void TecUtilStatusStartPercentDone (const char *PercentDoneText, Boolean_t ShowStopButton, Boolean_t ShowProgressBar)
 Called when a long operation that needs to present percent done information on the status line begins.
void TecUtilStatusSetPercentDoneText (const char *PercentDoneText)
 Sets the string to displayed on the percent done status line.
Boolean_t TecUtilStatusCheckPercentDone (int PercentDone)
 Tells the status line what percentage of the task is complete.
void TecUtilStatusFinishPercentDone (void)
 Called when a long operation that needs to present percent done information on the status line completes.
Boolean_t TecUtilInterruptCheck (void)
 Checks if Tecplot is in an interrupted state.
void TecUtilInterrupt (void)
 Interrupt Tecplot execution.
char * TecUtilStringConvOldFormatting (const char *OldString, Font_e BaseFont)
 Convert a text string using the old formatting syntax into the new formatting syntax.
char * TecUtilStringAlloc (int MaxLength, const char *DebugInfo)
 Allocate a character string.
void TecUtilStringDealloc (char **S)
 Free a string previously allocated with TecUtilStringAlloc(), or one that was allocated and returned as the result of calling any other TecUtilXxx function.
void TecUtilDropOpeningBanner (void)
 Forces drop of opening banner.
void TecUtilPopMainProcessWindow (void)
 Pop Tecplot to the top of the Z-Order.
char * TecUtilGetCurLayoutFName (void)
 Get the current layout file name.
void TecUtilHelp (const char *HelpFileOrURL, Boolean_t GoToID, int HelpID)
 Use either WinHelp or a browser to view help information.
void TecUtilPleaseWait (const char *WaitMessage, Boolean_t DoWait)
 Shows or hides the wait cursor and optionally displays a wait message.
Boolean_t TecUtilThreadCreateDetached (ThreadFunction_pf ThreadFunction, ThreadData_t ThreadData)
 Create a new thread.
Mutex_pa TecUtilThreadMutexAlloc (void)
 Allocates and initializes a new thread mutex for use with the mutex.
void TecUtilThreadMutexDealloc (Mutex_pa *Mutex)
 Deallocates thread mutex previously allocated with TecUtilThreadMutexAlloc().
void TecUtilThreadMutexLock (Mutex_pa Mutex)
 Lock on a thread mutex previously allocated with TecUtilThreadMutexAlloc().
void TecUtilThreadMutexUnlock (Mutex_pa Mutex)
 Unlock on a thread mutex previously locked with TecUtilThreadMutexLock().
Boolean_t TecUtilScriptExecRegisterCallback (const char *FileExt, const char *ScriptLanguage, ScriptExecCallback_pf ScriptExecCallback, ArbParam_t ClientData)
 Registers the script execution callback and client data with the specified file extension.
Boolean_t TecUtilScriptExec (const char *FileName)
 Executes the specified script file.
Boolean_t TecUtilScriptProcessorGetClientData (const char *ScriptExtension, ArbParam_t *ClientData)
 Returns client data associated with a script processor.
LgIndex_t TecUtilGetTecplotVersion (void)
SmInteger_t TecUtilTecplotGetMajorVersion (void)
 Gets Tecplot's major version number.
SmInteger_t TecUtilTecplotGetMinorVersion (void)
 Gets Tecplot's minor version number.
SmInteger_t TecUtilTecplotGetMajorRevision (void)
 Gets Tecplot's major revision number.
SmInteger_t TecUtilTecplotGetMinorRevision (void)
 Gets Tecplot's minor revision number.
char * TecUtilTecplotGetHomeDirectory (void)
 Get the Tecplot home directory.
char * TecUtilTecplotGetExePath (void)
 Get the full path name of the Tecplot executable.
void TecUtilInterfaceGetDotsPerInch (double *VDotsPerInch, double *HDotsPerInch)
 Get the number of pixels per inch in the vertical and horizontal directions on the screen.
Boolean_t TecUtilGetTempFileName (char **TempFileName)
Boolean_t TecUtilFileGetTempName (char **TempFileName)
 Creates a temporary file name, including a full path.
ScreenDim_t TecUtilGetDefaultExportImageWidth (ExportFormat_e ExportFormat, ExportRegion_e ExportRegion)
 Calculates the width of an image for exporting for the given export format and plot region.

Function Documentation

void TecUtilArrayDealloc ( void **  Array  ) 

Deallocates an array that was allocated and given to an add-on by Tecplot and assigns the pointer to NULL.

This function may not be used for deallocating memory allocated by any other facility (such as the add-on itself).

Parameters:
Array Pointer to the Array to be deallocated.
Fortran Syntax:
    SUBROUTINE TecUtilArrayDealloc(Array)
    POINTER (ArrayPtr, Array)

Python Syntax:

    This function is not supported in Python.

See also:
See TecGUIListGetSelectedItems() for a complete example.

Boolean_t TecUtilDelay ( LgIndex_t  Seconds  ) 

Delay Tecplot execution for a specified time.

Parameters:
Seconds Number of seconds to delay
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDelay(Seconds)
    INTEGER*4 Seconds

Python Syntax:

  Results = TecUtil.Delay(Seconds)

  Input:
                  Seconds              int
  Output:
    Results[0]    ReturnVal            boolean

void TecUtilDispatchWorkAreaEvent ( int  I,
int  J,
int  ButtonOrKey,
Event_e  Event,
Boolean_t  IsShifted,
Boolean_t  IsAlted,
Boolean_t  IsControlled 
)

Dispatches a Tecplot work area event to the Tecplot engine.

The event is queued to be processed at time deemed appropriate by Tecplot.

Since:
11.0-5-036
Parameters:
I I-Location in the work area where the event occurs (in screen coordinates) with 0 being the left edge of the work area.
J J-Location in the work area where the event occurs (in screen coordinates) with 0 being the top edge of the work area.
ButtonOrKey The ButtonOrKey parameter assumes the following: If the event is a button press, then: ButtonOrKey = 1 ....... Mouse button 1. ButtonOrKey = 2 ....... Mouse button 2. If the event is a key press then: ButtonOrKey = 32 to 127 for ASCII characters on the keyboard.
Event Event type. The possible values are: Event_ButtonPress, Event_ButtonRelease, Event_ButtonDoublePress, Event_Motion, Event_Drag or Event_KeyPress
IsShifted Set to TRUE if Shift key is held down.
IsAlted Set to TRUE if Alt key is held down.
IsControlled Set to TRUE if Ctrl key is held down.
Python Syntax:
  Results = TecUtil.DispatchWorkAreaEvent(I, J, ButtonOrKey, Event, IsShifted, IsAlted, IsControlled)

  Input:
                  I                    int
                  J                    int
                  ButtonOrKey          int
                  Event                Event_e  (defined in TecVals.py)
                  IsShifted            boolean
                  IsAlted              boolean
                  IsControlled         boolean
  Output:
    Results[0]    ReturnVal            NONE

Boolean_t TecUtilDoubleBuffer ( DoubleBufferAction_e  DoubleBufferAction  ) 

Implements a double buffer action as described below by the DoubleBufferAction parameter definitions.

Parameters:
DoubleBufferAction Action to take. The possible values are:

Returns:
TRUE if successful, FALSE if not.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDoubleBuffer(DoubleBufferAction)
    INTEGER*4 DoubleBufferAction

Python Syntax:

  Results = TecUtil.DoubleBuffer(DoubleBufferAction)

  Input:
                  DoubleBufferAction   DoubleBufferAction_e  (defined in TecVals.py)
  Output:
    Results[0]    ReturnVal            boolean

void TecUtilDropOpeningBanner ( void   ) 

Forces drop of opening banner.

If this function is not called, the opening banner will stay up until all addons are loaded.

Fortran Syntax:

Python Syntax:

  Results = TecUtil.DropOpeningBanner()

  Output:
    Results[0]    ReturnVal            NONE

Boolean_t TecUtilFileDownloadURL ( const char *  SourceURL,
const char *  LocalDestinationFile,
Boolean_t  IsAscii,
Boolean_t  ConfirmOverwrite 
)

Download a file given a valid URL.

Parameters:
SourceURL A string representing the URL for the file to download. Must be valid URL syntax
LocalDestinationFile A string representing a local filename where the data is to be stored
IsAscii Set to TRUE if the file is to be treated as an ASCII file during the download. Set to FALSE if it is to be treated as a Binary file during the download
ConfirmOverwrite Set to TRUE if you want the user to be prompted with a message and options if LocalDestinationFile exists. The user can then choose to cancel the operation. If set to FALSE and LocalDestinationFile exists it will be overwritten with no warning
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilFileDownloadURL(
   &                   SourceURL,
   &                   LocalDestinationFile,
   &                   IsAscii,
   &                   ConfirmOverwrite)
    CHARACTER*(*)   SourceURL
    CHARACTER*(*)   LocalDestinationFile
    INTEGER*4       IsAscii
    INTEGER*4       ConfirmOverwrite

Python Syntax:

  Results = TecUtil.FileDownloadURL(SourceURL, LocalDestinationFile, IsAscii, ConfirmOverwrite)

  Input:
                  SourceURL            string
                  LocalDestinationFile string
                  IsAscii              boolean
                  ConfirmOverwrite     boolean
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilFileGetTempName ( char **  TempFileName  ) 

Creates a temporary file name, including a full path.

An empty file with the temporary file name is also created.

Parameters:
TempFileName Receives the temporary file name, including path. You must later free this string with TecUtilStringDealloc()
Returns:
TRUE if successful, FALSE otherwise. If the return value is FALSE, *FileName is set to NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilFileGetTempName(
   &                   TempFileName,
   &                   TempFileNameLength)
    CHARACTER*(*)   TempFileName
    INTEGER*4       TempFileNameLength

Python Syntax:

  Results = TecUtil.FileGetTempName()

  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    TempFileName         string

Create a temporary file.

   {
     FILE *TempFile = NULL;
     char *TempFileName = NULL;
   
     if ( TecUtilFileGetTempName(&TempFileName) )
       {
         TempFile = fopen(TempFileName,"w");
         if ( TempFile )
           {
             // Do something with the temp file.
             fclose(TempFile);
           }

         // Be sure to deallocate the string when finished.
         TecUtilStringDealloc(&TempFileName);
       }
   }

Boolean_t TecUtilFileIsURL ( const char *  URLFName  ) 

Convenience function that will determine if a supplied string uses valid URL syntax.

Parameters:
*URLFName A string containing the URL to test
Returns:
Returns TRUE if URL is valid, FALSE otherwise
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilFileIsURL(URLFName)
    CHARACTER*(*) URLFName

Python Syntax:

  Results = TecUtil.FileIsURL(URLFName)

  Input:
                  URLFName             string
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilFileUploadURL ( const char *  LocalSourceFile,
const char *  DestinationURL,
Boolean_t  IsAscii,
Boolean_t  ConfirmOverwrite 
)

Upload a file given a valid URL.

Parameters:
LocalSourceFile A string representing the local file to upload
DestinationURL A string representing the remote filename where the data is to be stored. Must be valid URL syntax,
IsAscii Set to TRUE if the file is to be treated as an ASCII file during the upload. Set to FALSE if it is to be treated as a Binary file during the upload
ConfirmOverwrite Set to TRUE if you want the user to be prompted with a message and options if exists. The user can then choose to cancel the operation. If set to FALSE and DestinationURL exists it will be overwritten with no warning
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilFileUploadURL(
   &                   LocalSourceFile,
   &                   DestinationURL,
   &                   IsAscii,
   &                   ConfirmOverwrite)
    CHARACTER*(*)   LocalSourceFile
    CHARACTER*(*)   DestinationURL
    INTEGER*4       IsAscii
    INTEGER*4       ConfirmOverwrite

Python Syntax:

  Results = TecUtil.FileUploadURL(LocalSourceFile, DestinationURL, IsAscii, ConfirmOverwrite)

  Input:
                  LocalSourceFile      string
                  DestinationURL       string
                  IsAscii              boolean
                  ConfirmOverwrite     boolean
  Output:
    Results[0]    ReturnVal            boolean

char* TecUtilGetBasePath ( const char *  FName  ) 

Get the base path of a file name.

This function allocates space for and creates a new string of the base path.

Parameters:
FName File name. A NULL file name is allowed in which case the startup directory is returned
Returns:
The base path of the file name including the trailing '/' or '\.' You must call TecUtilStringDealloc() on the returned string.
Fortran Syntax:
    SUBROUTINE TecUtilGetBasePath(
   &           FName,
   &           Result,
   &           ResultLength)
    CHARACTER*(*)   FName
    CHARACTER*(*)   Result
    INTEGER*4       ResultLength

Python Syntax:

  Results = TecUtil.GetBasePath(FName)

  Input:
                  FName                string
  Output:
    Results[0]    ReturnVal            string

Get the start up directory and the base path of the current layout file name:

   char *FName = TecUtilGetCurLayoutFName();
   if (FName)
     {
       char *StartUpDir = TecUtilGetBasePath(NULL);
       char *BasePath = TecUtilGetBasePath(FName);
       //  BasePath is something like "C:\TEC75\DEMO\LAY\"  
       if (BasePath)
         {
           .
           .
             TecUtilStringDealloc(&BasePath);
         }
       TecUtilStringDealloc(&FName);
       if (StartUpDir)
         TecUtilStringDealloc(&StartUpDir);
     }

char* TecUtilGetCurLayoutFName ( void   ) 

Get the current layout file name.

Returns:
The current layout file name including the path. You must call TecUtilStringDealloc() on the returned string.
Fortran Syntax:
    SUBROUTINE TecUtilGetCurLayoutFName(
   &           Result,
   &           ResultLength)
    CHARACTER*(*)   Result
    INTEGER*4       ResultLength

Python Syntax:

  Results = TecUtil.GetCurLayoutFName()

  Output:
    Results[0]    ReturnVal            string

ScreenDim_t TecUtilGetDefaultExportImageWidth ( ExportFormat_e  ExportFormat,
ExportRegion_e  ExportRegion 
)

Calculates the width of an image for exporting for the given export format and plot region.

Since:
11.2-0-439
Parameters:
ExportFormat The format in which an image will be exported.
ExportRegion The region of the plot that will be exported.
Returns:
Returns default width of the image for exporting.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilGetDefaultExportImageWidth(
   &                   ExportFormat,
   &                   ExportRegion)
    INTEGER*4       ExportFormat
    INTEGER*4       ExportRegion

Python Syntax:

  Results = TecUtil.GetDefaultExportImageWidth(ExportFormat, ExportRegion)

  Input:
                  ExportFormat         ExportFormat_e  (defined in TecVals.py)
                  ExportRegion         ExportRegion_e  (defined in TecVals.py)
  Output:
    Results[0]    ReturnVal            int

LgIndex_t TecUtilGetTecplotVersion ( void   ) 

Deprecated:
Please use TecUtilTecplotGetMajorVersion(), TecUtilTecplotGetMinorVersion(), TecUtilTecplotGetMajorRevision(), and TecUtilTecplotGetMinorRevision() instead.

Boolean_t TecUtilGetTempFileName ( char **  TempFileName  ) 

Deprecated:
Please use TecUtilFileGetTempName() instead.

void TecUtilHelp ( const char *  HelpFileOrURL,
Boolean_t  GoToID,
int  HelpID 
)

Use either WinHelp or a browser to view help information.

WinHelp is only available under Windows.

Parameters:
HelpFileOrURL This represents either a WinHelp file or a valid URL for a browser. If HelpFileOrURL ends with .hlp then this is assumed to be a WinHelp file, and in Windows, the Windows help engine will be launched (in UNIX, an error will result). You can specify an absolute path, or just use the base name and Tecplot will prepend the path to the help subdirectory below the Tecplot home directory for you. If this parameter does not end in .hlp then this is assumed to be a local HTML file or a valid URL. If just a base file name is supplied, then file:/ and the help directory below the Tecplot home directory will be prepended for you. If http:/ or file:/ is not prepended, then file:/ will be prepended for you. Specifying crunch/index.html will launch the browser with file:/xxxxx/help/crunch/index.html where xxxxx is the Tecplot home directory. You must begin HelpFileOrURL with http:/ or www. if you wish to reference something on the web. In Windows a query is made to determine the currently registered browser. In UNIX you must specify the command to use to launch your browser. To specify the browser command, add the following to your tecplot.cfg file:This requires that Netscape is already up and running and is iconified. If Netscape is not up then use:$!Interface UnixBrowserLaunchCmd = "/opt/netscape/netscape 'OpenURL(@)'".
GoToID Flag specifying whether or not to skip into the help file. This is only used if a WinHelp file is being loaded. Set to TRUE if you want to skip to the location in the help file identified by HelpID. If set to FALSE, then the index page appears first.
HelpID Location to go to in the help file. This is only used if a WinHelp file is being loaded. If GotoID is TRUE, then set this to the marker number to skip to in the .hlp file.
Fortran Syntax:
    SUBROUTINE TecUtilHelp(
   &           HelpFileOrURL,
   &           GoToID,
   &           HelpID)
    CHARACTER*(*)   HelpFileOrURL
    INTEGER*4       GoToID
    INTEGER*4       HelpID

Python Syntax:

  Results = TecUtil.Help(HelpFileOrURL, GoToID, HelpID)

  Input:
                  HelpFileOrURL        string
                  GoToID               boolean
                  HelpID               int
  Output:
    Results[0]    ReturnVal            NONE

Use a browser to launch the help file myaddon.html from the help sub-directory below the Tecplot home directory:

   TecUtilHelp("myaddon.html",FALSE,0);

Boolean_t TecUtilImageBitmapCreateX ( ArgList_pa  ArgList  ) 

Create a true color or color-reduced bitmap of a specified width.

Parameters:
ArgList Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions.

Arglist Values

SV_CONVERTTO256COLORS
Type: Boolean_t
Arg Function: TecUtilArgListAppendInt()
Default: TRUE
Required: No
Notes: Set this to TRUE to create a color-reduced bitmap. A 256-color indexed bitmap will be created. After rendering the image using this function, call TecUtilImageGetColorTable() to get the palette, and TecUtilImageIndexedGetScanLine() to retrieve the palette indices for a scan line. Set this to FALSE to create a true color image. After rendering the image using this function, call TecUtilImageRGBGetScanLine() to get the red, green, and blue values for a scan line.

SV_IMAGEWIDTH
Type: ScreenDim_t
Arg Function: TecUtilArgListAppendInt()
Default: 512
Required: No
Notes: This value specifies the resolution in pixels of the created image. The height is automatically calculated based on the export region and the width. The approximate amount of memory required to generate an image, either color-reduced or true color, is Width by Height by three. Thus, very large values for this parameter will require a large amount of memory. This function will return FALSE if there is insufficient memory to render an image of the requested size

SV_EXPORTREGION
Type: DumpRegion_e
Arg Function: TecUtilArgListAppendInt()
Default: ExportRegion_CurrentFrame
Required: No
Notes: Export region. Set this ExportRegion_Currentframe, ExportRegion_AllFrames, or ExportRegion_WorkArea


Returns:
TRUE if the image was successfully created and rendered, otherwise FALSE.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilImageBitmapCreateX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

  Results = TecUtil.ImageBitmapCreateX(ArgList)

  Input:
                  ArgList              dictionary
  Output:
    Results[0]    ReturnVal            boolean

ArgList_pa ArgList;

   TecUtilLockStart(AddOnID);
   ArgList = TecUtilArgListAlloc();
   TecUtilArgListAppendInt(ArgList,SV_CONVERTTO256COLORS,FALSE);
   // Create a true color image. 
   TecUtilArgListAppendInt(ArgList,SV_IMAGEWIDTH,1000);
   // The image will be rendered with a width of 1000 pixels. 
   TecUtilArgListAppendInt(ArgList,SV_EXPORTREGION,(LgIndex_t)ExportRegion_WorkArea);
   TecUtilImageBitmapCreateX(ArgList);
   // Export the image. 
   TecUtilArgListDealloc(&ArgList);
   TecUtilLockFinish(AddOnID);

void TecUtilImageBitmapDestroy ( void   ) 

Destroy the bitmap buffer.

Fortran Syntax:

Python Syntax:

  Results = TecUtil.ImageBitmapDestroy()

  Output:
    Results[0]    ReturnVal            NONE

void TecUtilImageGetColorTable ( Byte_t Red_Array,
Byte_t Green_Array,
Byte_t Blue_Array 
)

Get the color table, that is, the palette, of a color-reduced image.

You must call either TecUtilImageIndexedBitmapCreate() or TecUtilImageBitmapCreateX() before calling this function. The caller of this function must allocate three arrays of at least 256 bytes and pass them to this function.

Parameters:
Red_Array Pointer to 256-byte array which will receive the red values of the color table. Must not be NULL
Green_Array Pointer to 256-byte array which will receive the green values of the color table. Must not be NULL
Blue_Array Pointer to 256-byte array which will receive the blue values of the color table. Must not be NULL.
Fortran Syntax:
    SUBROUTINE TecUtilImageGetColorTable(
   &           Red_Array,
   &           Green_Array,
   &           Blue_Array)
    INTEGER*4       Red_Array
    INTEGER*4       Green_Array
    INTEGER*4       Blue_Array

Python Syntax:

  Results = TecUtil.ImageGetColorTable(Red_Array, Green_Array, Blue_Array)

  Input:
                  Red_Array            
                  Green_Array          
                  Blue_Array           
  Output:
    Results[0]    ReturnVal            NONE

   {
     Byte_t Red[256];
     Byte_t Green[256];
     Byte_t Blue[256];
     short ColorTable[256]; // Must be at least 256 
   
     TecUtilLockStart(AddOnID);
     TecUtilImageBitmapCreateX(NULL);
     // Will create a 256-color image. 
     TecUtilImageGetColorTable(Red,Green,Blue);
     // Export the image. 
     TecUtilImageBitmapDestroy();
     TecUtilLockFinish(AddOnID);
   }

Boolean_t TecUtilImageGetDimensions ( short *  Width,
short *  Height 
)

Gets the image dimensions.

You must call TecUtilImageRGBBitmapCreate() before using this function.

Parameters:
Width Receives the width of the image in pixels. May be NULL.
Height Receives the height of the image in scan lines. May be NULL
Returns:
TRUE if successful, FALSE otherwise
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilImageGetDimensions(
   &                   Width,
   &                   Height)
    INTEGER*4       Width
    INTEGER*4       Height

Python Syntax:

  Results = TecUtil.ImageGetDimensions()

  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    Width                int
    Results[2]    Height               int

Create an indexed bitmap and get the dimensions.

   {
     short Width,Height;
     short ColorTable[256]; // Must be at least 256 
   
     TecUtilLockStart(AddOnID);
   
     if (TecUtilImageIndexedBitmapCreate(BitDumpRegion_CurrentFrame,
                                         ColorTable))
       {
         TecUtilImageGetDimensions(&Width,&Height);
         // Dimensions are now in the Width and Height variables 
         TecUtilImageBitmapDestroy(); // Through with the bitmap 
       }
     TecUtilLockFinish(AddOnID);
   }

Boolean_t TecUtilImageIndexedBitmapCreate ( BitDumpRegion_e  Region,
short *  RedColorTable_Array,
short *  GreenColorTable_Array,
short *  BlueColorTable_Array 
)

Call this function to initialize the export state if you are exporting using the index functions.

Must be called before calling TecUtilImageIndexedGetScanLine() and TecUtilImageGetDimensions().

Parameters:
Region Region to export. Must be a valid region
RedColorTable_Array Receives the color table Red component. Caller must allocate this array and they must have 256 elements. You can also pass NULL for this arrays, using TecUtilImageGetColorTable() to get the color table. Note that in Version 9.0 or higher, the indices are guaranteed to be less than 256
GreenColorTable_Array Receives the color table Green component.
BlueColorTable_Array Receives the color table Blue component.
Returns:
TRUE if successful, FALSE otherwise
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilImageIndexedBitmapCreate(
   &                   Region,
   &                   RedColorTable_Array,
   &                   GreenColorTable_Array,
   &                   BlueColorTable_Array)
    INTEGER*4       Region
    INTEGER*4       RedColorTable_Array
    INTEGER*4       GreenColorTable_Array
    INTEGER*4       BlueColorTable_Array

Python Syntax:

  Results = TecUtil.ImageIndexedBitmapCreate(Region, RedColorTable_Array, GreenColorTable_Array, BlueColorTable_Array)

  Input:
                  Region               BitDumpRegion_e  (defined in TecVals.py)
                  RedColorTable_Array  list of ints
                  GreenColorTable_Array list of ints
                  BlueColorTable_Array list of ints
  Output:
    Results[0]    ReturnVal            boolean

Create an indexed bitmap.

   {
     short RedColorTable[256];
     short BlueColorTable[256];
     short GreenColorTable[256];
   
     TecUtilLockStart(AddOnID);
     if (TecUtilImageIndexedBitmapCreate(BitDumpRegion_CurrentFrame,
                                         RedColorTable,
                                         GreenColorTable,
                                         BlueColorTable))
       {
         // Bitmap has been created 
         TecUtilImageBitmapDestroy(); // When you're finished with it 
       }
   
     TecUtilLockFinish(AddOnID);
   }

Boolean_t TecUtilImageIndexedGetScanLine ( short  ScanLine,
short *  RGBIndex_Array 
)

Gets the color table indices for a scan line.

The calling application must allocate/free the RGBIndex array and ensure that it has enough space.

Parameters:
ScanLine One-based scan line to get the RGB values from. Must be between one and the height of the image
RGBIndex_Array Array which receives the indicies. These values can be indexed into the color table returned by TecUtilImageIndexedBitmapCreate().
Returns:
TRUE if successful, FALSE otherwise
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilImageIndexedGetScanLine(
   &                   ScanLine,
   &                   RGBIndex_Array)
    INTEGER*4       ScanLine
    INTEGER*4       RGBIndex_Array

Python Syntax:

  Results = TecUtil.ImageIndexedGetScanLine(ScanLine, RGBIndex_Array)

  Input:
                  ScanLine             int
                  RGBIndex_Array       list of ints
  Output:
    Results[0]    ReturnVal            boolean

Get the color table indices for the first scan line line.

   {
     short Width,Height;
     short *RGBIndex = NULL;
     short ColorTableR[256]; // Must be at least 256 
     short ColorTableG[256];
     short ColorTableB[256];
   
     TecUtilLockStart(AddOnID);
   
     if  (TecUtilImageIndexedBitmapCreate(BitDumpRegion_CurrentFrame,
                                          ColorTableR)
                                          ColorTableG)
                                          ColorTableB)
       {
         TecUtilImageGetDimensions(&Width,&Height);
         RGBIndex = (short*) malloc(Width * sizeof(short));
         TecUtilImageIndexedGetScanLine(1, // scan lines are 1-based
                                        RGBIndex);
         TecUtilImageBitmapDestroy();
       }
   
     TecUtilLockFinish(AddOnID);
   }

Boolean_t TecUtilImageRGBBitmapCreate ( BitDumpRegion_e  Region  ) 

Call this function to initialize the export state if you are exporting using the RGB functions.

Must be called before calling TecUtilImageRGBGetScanLine() and TecUtilImageGetDimensions().

Parameters:
Region Region to export. Must be a valid region
Returns:
TRUE if the export state was successfully initialized, FALSE otherwise
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilImageRGBBitmapCreate(Region)
    INTEGER*4 Region

Python Syntax:

  Results = TecUtil.ImageRGBBitmapCreate(Region)

  Input:
                  Region               BitDumpRegion_e  (defined in TecVals.py)
  Output:
    Results[0]    ReturnVal            boolean

Create an RGB (24-bit) bitmap.

See the Example for TecUtilImageRGBBitmapCreate().

Boolean_t TecUtilImageRGBGetScanLine ( short  ScanLine,
short *  Red_Array,
short *  Green_Array,
short *  Blue_Array 
)

Gets the RGB values of a scan line.

The calling application must allocate/free the arrays and ensure that they have enough space.

Parameters:
ScanLine One-based scan line to get the RGB values from. Must be between one and the height of the image
Red_Array Array which receives the RED components. Caller must allocate this array. May not be NULL.
Green_Array Array which receives the GREEN components. Caller must allocate this array. May not be NULL
Blue_Array Array which receives the BLUE components. Caller must allocate this array. May not be NULL
Returns:
TRUE if successful, FALSE otherwise.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilImageRGBGetScanLine(
   &                   ScanLine,
   &                   Red_Array,
   &                   Green_Array,
   &                   Blue_Array)
    INTEGER*4       ScanLine
    INTEGER*4       Red_Array
    INTEGER*4       Green_Array
    INTEGER*4       Blue_Array

Python Syntax:

  Results = TecUtil.ImageRGBGetScanLine(ScanLine, Red_Array, Green_Array, Blue_Array)

  Input:
                  ScanLine             int
                  Red_Array            list of ints
                  Green_Array          list of ints
                  Blue_Array           list of ints
  Output:
    Results[0]    ReturnVal            boolean

Get the first scan line.

   {
     // 24-bit color 
     short *Red;
     short *Green;
     short *Blue;
     short Width,Height;
   
     TecUtilLockStart(AddOnID);
   
     if (TecUtilImageRGBBitmapCreate(BitDumpRegion_CurrentFrame))
      {
        TecUtilImageGetDimensions(&Width,&Height);
        Red = (short*) malloc(Width * sizeof(short));
        Green = (short*) malloc(Width * sizeof(short));
        Blue = (short*) malloc(Width * sizeof(short));
    
        TecUtilImageRGBGetScanLine(1,Red,Green,Blue);
    
        TecUtilImageBitmapDestroy();
      }
   
     TecUtilLockFinish(AddOnID);
   }

void TecUtilInterfaceGetDotsPerInch ( double *  VDotsPerInch,
double *  HDotsPerInch 
)

Get the number of pixels per inch in the vertical and horizontal directions on the screen.

Parameters:
VDotsPerInch The number of pixels per inch in the vertical direction
HDotsPerInch The number of pixels per inch in the horizontal direction.
Fortran Syntax:
    SUBROUTINE TecUtilInterfaceGetDotsPerInch(
   &           VDotsPerInch,
   &           HDotsPerInch)
    REAL*8          VDotsPerInch
    REAL*8          HDotsPerInch

Python Syntax:

  Results = TecUtil.InterfaceGetDotsPerInch()

  Output:
    Results[0]    VDotsPerInch         double
    Results[1]    HDotsPerInch         double

Get the pixels per inch values:

   double VertPixels, HorzPixels;
   TecUtilInterfaceGetDotsPerInch(&VertPixels, &HorzPixels);

void TecUtilInterfaceSuspend ( Boolean_t  DoSuspend  ) 

Suspends or un-suspends updates to the interface only (not including the status line).

Updates to the work area and status line are still preformed unless suspended via a call to TecUtilDrawGraphics(), TecUtilWorkAreaSuspend() or TecUtilStatusSuspend().

Since:
11.0-3-010
Parameters:
DoSuspend Indicates if Tecplot should suspend or un-suspend making updates to the interface.
See also:
TecUtilDrawGraphics, TecUtilWorkAreaSuspend, TecUtilStatusSuspend
Python Syntax:
  Results = TecUtil.InterfaceSuspend(DoSuspend)

  Input:
                  DoSuspend            boolean
  Output:
    Results[0]    ReturnVal            NONE

void TecUtilInterrupt ( void   ) 

Interrupt Tecplot execution.

This is mainly for use with addons which use timers.

Fortran Syntax:

    SUBROUTINE TecUtilInterrupt()

Python Syntax:

  Results = TecUtil.Interrupt()

  Output:
    Results[0]    ReturnVal            NONE

The function NewDataIsReady is assumed to be called when a timer goes off and some new data is ready to be read into Tecplot. OldDataIsNotDoneDrawingYet is a boolean which is TRUE if the previous data is still being drawn in Tecplot's workspace. Interrupt Tecplot if the new data is ready before the old data is finished redrawing.

   extern Boolean_t OldDataIsNotDoneDrawingYet;
   void NewDataIsReady (void)
   {
     if (OldDataIsNotDoneDrawingYet)
       TecUtilInterrupt();
     //  Load the new data into Tecplot and redraw  
   }

Boolean_t TecUtilInterruptCheck ( void   ) 

Checks if Tecplot is in an interrupted state.

This function should be called during long tasks that are performed within the add-on where the user might want to interrupt the process by pressing a key.

Since:
11.0-1-075
Returns:
TRUE if Tecplot is in an interrupted state, FALSE otherwise.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilInterruptCheck()

Python Syntax:

  Results = TecUtil.InterruptCheck()

  Output:
    Results[0]    ReturnVal            boolean

See also:
TecUtilInterrupt, TecUtilStatusCheckPercentDone

void TecUtilLockFinish ( AddOn_pa  AddOn  ) 

Unlock Tecplot.

Call only after you have first called TecUtilLockStart(). See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot.

Parameters:
AddOn The add-on id from which the function is called
Fortran Syntax:
    SUBROUTINE TecUtilLockFinish(AddOnPtr)
    POINTER (AddOnPtr, AddOn)

Python Syntax:

    This function is not supported in Python.

char* TecUtilLockGetCurrentOwnerName ( void   ) 

Queries for and returns the name of the object currently locking Tecplot.

Returns:
Character string containing the name of the lock owner. You must free this string using TecUtilStringDealloc() when finished.
Fortran Syntax:
    SUBROUTINE TecUtilLockGetCurrentOwnerName(
   &           Result,
   &           ResultLength)
    CHARACTER*(*)   Result
    INTEGER*4       ResultLength

Python Syntax:

  Results = TecUtil.LockGetCurrentOwnerName()

  Output:
    Results[0]    ReturnVal            string

char *Name = NULL;

   name = TecUtilLockGetCurrentOwnerName(void);
   if (Name)
     {
      TecUtilStringDealloc(&Name);
     }

void TecUtilLockOff ( void   ) 

Unlock Tecplot.

For every call to TecUtilLockOff(), you must have a matching call to TecUtilLockOn(). However, both these functions have been replaced by TecUtilLockStart() and TecUtilLockFinish(). The only time these functions should be used in lieu of TecUtilLockStart() and TecUtilFinish() is in the InitTecAddon function when an AddonID has not yet been created. See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot.

See also:
TecUtilLockFinish()
Fortran Syntax:
    SUBROUTINE TecUtilLockOff()

Python Syntax:

    This function is not supported in Python.

void TecUtilLockOn ( void   ) 

Lock Tecplot.

For every call to TecUtilLockOn(), you must have a matching call to TecUtilLockOff(). However, both these functions have been replaced by and TecUtilLockFinish(). The only time these functions should be used in lieu of TecUtilLockStart() and TecUtilFinish() is in the InitTecAddon function when an AddonID has not yet been created. See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot.

See also:
TecUtilLockStart()
Fortran Syntax:
    SUBROUTINE TecUtilLockOn()

Python Syntax:

    This function is not supported in Python.

void TecUtilLockStart ( AddOn_pa  AddOn  ) 

Lock Tecplot.

For every call to TecUtilLockStart(), you must have a matching call to TecUtilLockFinish(). See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot.

Parameters:
AddOn The add-on id from which the function is called
Fortran Syntax:
    SUBROUTINE TecUtilLockStart(AddOnPtr)
    POINTER (AddOnPtr, AddOn)

Python Syntax:

    This function is not supported in Python.

Boolean_t TecUtilOnIdleQueueAddCallback ( OnIdleCallback_pf  Callback,
ArbParam_t  ClientData 
)

Adds the function to a list of functions that Tecplot calls only one time when Tecplot is in an idle state.

This is particularly important for any add-on that needs to perform potentially disruptive Tecplot operations (such as modifying data) in response to a particular state change. FORTRAN addons can only register one on-idle callback at a time. All other addons can register multiple on-idle callbacks.

Parameters:
Callback Function to be called only one time when Tecplot becomes idle (and is not locked). After the call, the function is removed from the queue. No attempt is made to ensure that only one instance of Callback is registered for a given task. It is up to the add-on to keep track of registration (see the use of the PendingMyUpdateFuncOnIdle variable in the example illustrated below).
ClientData This can be any value and will be passed to the on-idle callback when the on idle callback is invoked. Typically this is a pointer to a structure needed by the callback function.
Returns:
TRUE if the callback was successfully added, FALSE otherwise.
Fortran Syntax:
 C
 C  Note: Only one on-idle callback function can active for each FORTRAN add-on.
 C  Registering another on-idle callback function overwrites the first.
 C  You may use ClientData to differentiate between different on-idle situations.
 C
    INTEGER*4 FUNCTION TecUtilOnIdleQueueAddCallback(
   &                   Callback,
   &                   ClientDataPtr)
    EXTERNAL           Callback
    POINTER            (ClientDataPtr, ClientData)

Python Syntax:

    This function is not supported in Python.

Clear the current layout.

   // Make sure only one on-idle function is registered at a time.
   static Boolean_t PendingMyUpdateFuncOnIdle = FALSE;
   
   static void MyUpdateFuncOnIdle(ArbParam_t ClientData)
   {
     // ... do some potentially disruptive work in Tecplot 
   
     // clear the flag so we can register another update if needed
     PendingMyUpdateFuncOnIdle = FALSE;
   }
   
   // A state change monitor usually used to update dialogs and
   // other add-on state when Tecplot (or another add-on) changes
   // the Tecplot's current state
   
   void MyStateChangeMonitor(StateChange_e StateChange,
                             ArbParam_t    CallData)
   {
     if (StateChange == StateChange_VarsAltered)
       {
         // Addon needs to do something that is disruptive so we
         // need to register an on-idle callback to do the work
         // when Tecplot is idle.
   
         // if one is not already registered ...
         if (!PendingMyUpdateFuncOnIdle)
           {
             // keep track of our registration 
             PendingMyUpdateFuncOnIdle = TRUE;
             // Queue the callback
             TecUtilOnIdleQueueAddCallback(MyUpdateFuncOnIdle,
                                           (ArbParam_t)MyData);
           }
       }
   }

void TecUtilPleaseWait ( const char *  WaitMessage,
Boolean_t  DoWait 
)

Shows or hides the wait cursor and optionally displays a wait message.

This function can be used to display an hourglass cursor and optional message during non-cancellable procedures. (If you need a cancel button and/or progress indicator, then you must use TecUtilDialogLaunchPercentDone() and TecUtilDialogDropPercentDone() rather than this function.)

Parameters:
WaitMessage Status message to be shown. The previous status message will be restored when the status is popped. If WaitMessage is NULL then "Working..." is placed on the status line
DoWait Use TRUE at the start of a wait, FALSE at the end (calls must balance).
Fortran Syntax:
    SUBROUTINE TecUtilPleaseWait(
   &           WaitMessage,
   &           DoWait)
    CHARACTER*(*)   WaitMessage
    INTEGER*4       DoWait

Python Syntax:

  Results = TecUtil.PleaseWait(WaitMessage, DoWait)

  Input:
                  WaitMessage          string
                  DoWait               boolean
  Output:
    Results[0]    ReturnVal            NONE

Show a wait message for a lengthy operation:

   {
     TecUtilLockStart(AddOnID);
     TecUtilPleaseWait("Computing the first 1,000,000 digits of PI",TRUE);
     ComputePI(1000000); // This may take awhile on a slow machine 
     TecUtilPleaseWait(NULL,FALSE); // Pop the wait cursor and 
          // restore it to its previous state 
     TecUtilDialogMessageBox("Finished computing PI",
                              MessageBox_Information);
     TecUtilLockFinish(AddOnID);
   }

void TecUtilPopMainProcessWindow ( void   ) 

Pop Tecplot to the top of the Z-Order.

This is Windows only and may not be called when Tecplot is running in batch mode.

Fortran Syntax:

Python Syntax:

  Results = TecUtil.PopMainProcessWindow()

  Output:
    Results[0]    ReturnVal            NONE

See also:
TecUtilMacroIsBatchModeActive

Boolean_t TecUtilPublish ( const char *  FName,
Boolean_t  IncludeLayoutPackage,
ImageSelection_e  ImageSelection 
)

Write out an html file and related image files.

The resulting html file, when viewed will show the current tecplot session.

Parameters:
FName Name of the publish file to create
IncludeLayoutPackage If TRUE, write out a layout package file as well and include a link to the file in the HTML document
ImageSelection Choose the image types to reference in the HTML document. Choose from one of ImageSelection_OnePerFrame or ImageSelection_WorkspaceOnly
Returns:
Returns TRUE if publish file could be written, FALSE otherwise.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilPublish(
   &                   FName,
   &                   IncludeLayoutPackage,
   &                   ImageSelection)
    CHARACTER*(*)   FName
    INTEGER*4       IncludeLayoutPackage
    INTEGER*4       ImageSelection

Python Syntax:

  Results = TecUtil.Publish(FName, IncludeLayoutPackage, ImageSelection)

  Input:
                  FName                string
                  IncludeLayoutPackage boolean
                  ImageSelection       ImageSelection_e  (defined in TecVals.py)
  Output:
    Results[0]    ReturnVal            boolean

Write out a publish file to mydoc.htm. Include the package file and include a separate image per frame.

Boolean_t TecUtilQuit ( void   ) 

Terminate the execution of the Tecplot program.

Note that program control returns to your application before quitting. Calling TecUtilQuit() merely sends a suggestion to Tecplot to quit. The only code that follows a call to TecUtilQuit() should be one or more calls to TecUtilLockFinish().

Returns:
Currently TRUE is always returned.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilQuit()

Python Syntax:

  Results = TecUtil.Quit()

  Output:
    Results[0]    ReturnVal            boolean

Exit Tecplot:

Boolean_t TecUtilQuitAddQueryCallback ( MopupQueryAddOnCallback_pf  QuitQueryCallback  ) 

Include a function in the list of functions to call when Tecplot is considering shutting down.

If you are building an add-on that could potentially be in a state where it is not convenient to shut down, then use this function. If the add-on does not wish for Tecplot to quit then the function referenced in this call can issue an error message to the user as to why this is the case and then return FALSE. A FALSE return value back to Tecplot will abort the shutdown sequence in Tecplot. TRUE return values by all MopupQuery functions will allow the shut down sequence to occur. The quit query callback is not to be used to do mopup operations such as closing of files and freeing of memory. Instead use TecUtilStateChangeAddCallback() to register a function that will listen for the message StateChange_QuitTecplot which is sent when Tecplot has begun its shutdown sequence.

Returns:
TRUE if the callback has been added. FALSE only if there is not enough room to allocate space for an additional callback (highly unlikely).
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilQuitAddQueryCallback(QuitQueryCallback)
    EXTERNAL QuitQueryCallback

Python Syntax:

    This function is not supported in Python.

Boolean_t TecUtilScriptExec ( const char *  FileName  ) 

Executes the specified script file.

Tecplot locates the script execute callback based upon the file name extension.

Since:
11.0-2-005
Parameters:
FileName Script file name to execute.
Returns:
TRUE if the script was found and executed without errors, FALSE otherwise.
See also:
TecUtilScriptExecRegisterCallback
Python Syntax:
  Results = TecUtil.ScriptExec(FileName)

  Input:
                  FileName             string
  Output:
    Results[0]    ReturnVal            boolean

Boolean_t TecUtilScriptExecRegisterCallback ( const char *  FileExt,
const char *  ScriptLanguage,
ScriptExecCallback_pf  ScriptExecCallback,
ArbParam_t  ClientData 
)

Registers the script execution callback and client data with the specified file extension.

When Tecplot encounters a file with the given extension it hands it off to the callback to execute.

Since:
11.0-2-005
Parameters:
FileExt File extension, such as "tcl" or "py", to associate with the script execution callback and client data.
ScriptLanguage Name of the scripting language. This name could be displayed in a Tecplot menu or dialog.
ScriptExecCallback Callback responsible for executing the script handed to it by Tecplot.
ClientData Any client data needed by the callback.
Returns:
TRUE if the script callback and client data were registered with the file extension, FALSE if the file extension is already registered with another callback.
See also:
ScriptExecCallback_pf
Python Syntax:
    This function is not supported in Python.

Boolean_t TecUtilScriptProcessorGetClientData ( const char *  ScriptExtension,
ArbParam_t ClientData 
)

Returns client data associated with a script processor.

Since:
11.2-0-200
Parameters:
ScriptExtension An extension for which the script processor was registered.
ClientData A pointer to an ArbParam_t variable to receive the client data.
Returns:
Returns TRUE if the client data was successfully retrieved for the script extension. FALSE, if no script processor was registered for the given script extension.
See also:
TecUtilScriptExecRegisterCallback
Python Syntax:
    This function is not supported in Python.

Boolean_t TecUtilStatusCheckPercentDone ( int  PercentDone  ) 

Tells the status line what percentage of the task is complete.

Note:
If you are simply wanting to check the interrupted state of Tecplot then call TecUtilInterruptCheck instead. Note that the sense of the return value between these two functions is reversed.
Parameters:
PercentDone Integer value between 0 and 100 indicating the progress of the operation.
Returns:
TRUE if the task was NOT interrupted or FALSE if the user interrupted the task.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStatusCheckPercentDone(PercentDone)
    INTEGER*4 PercentDone

Python Syntax:

  Results = TecUtil.StatusCheckPercentDone(PercentDone)

  Input:
                  PercentDone          int
  Output:
    Results[0]    ReturnVal            boolean

See also:
TecUtilInterruptCheck, TecUtilStatusStartPercentDone, TecUtilStatusSetPercentDoneText, TecUtilStatusFinishPercentDone

void TecUtilStatusFinishPercentDone ( void   ) 

Called when a long operation that needs to present percent done information on the status line completes.

A call to TecUtilStatusStartPercentDone() must have preceded this call.

Fortran Syntax:

Python Syntax:

  Results = TecUtil.StatusFinishPercentDone()

  Output:
    Results[0]    ReturnVal            NONE

See also:
TecUtilStatusStartPercentDone, TecUtilStatusSetPercentDoneText, TecUtilStatusCheckPercentDone

void TecUtilStatusSetPercentDoneText ( const char *  PercentDoneText  ) 

Sets the string to displayed on the percent done status line.

Parameters:
PercentDoneText String to displayed.
Fortran Syntax:
    SUBROUTINE TecUtilStatusSetPercentDoneText(PercentDoneText)
    CHARACTER*(*) PercentDoneText

Python Syntax:

  Results = TecUtil.StatusSetPercentDoneText(PercentDoneText)

  Input:
                  PercentDoneText      string
  Output:
    Results[0]    ReturnVal            NONE

See also:
TecUtilStatusStartPercentDone, TecUtilStatusCheckPercentDone, TecUtilStatusFinishPercentDone

void TecUtilStatusStartPercentDone ( const char *  PercentDoneText,
Boolean_t  ShowStopButton,
Boolean_t  ShowProgressBar 
)

Called when a long operation that needs to present percent done information on the status line begins.

Parameters:
PercentDoneText Text string to initally display. This can be changed as progress continues by calling TecUtilStatusSetPercentDoneText().
ShowStopButton TRUE to show button, FALSE otherwise.
ShowProgressBar TRUE to show progress bar, FALSE otherwise.
Fortran Syntax:
    SUBROUTINE TecUtilStatusStartPercentDone(
   &           PercentDoneText,
   &           ShowStopButton,
   &           ShowProgressBar)
    CHARACTER*(*)   PercentDoneText
    INTEGER*4       ShowStopButton
    INTEGER*4       ShowProgressBar

Python Syntax:

  Results = TecUtil.StatusStartPercentDone(PercentDoneText, ShowStopButton, ShowProgressBar)

  Input:
                  PercentDoneText      string
                  ShowStopButton       boolean
                  ShowProgressBar      boolean
  Output:
    Results[0]    ReturnVal            NONE

See also:
TecUtilStatusSetPercentDoneText, TecUtilStatusCheckPercentDone, TecUtilStatusFinishPercentDone

void TecUtilStatusSuspend ( Boolean_t  DoSuspend  ) 

Suspends or un-suspends updates to the status line only.

Updates to the work area, sidebar, and menu are still preformed unless suspended via a call to TecUtilDrawGraphics(), TecUtilWorkAreaSuspend() or TecUtilInterfaceSuspend().

Since:
11.0-3-010
Parameters:
DoSuspend Indicates if Tecplot should suspend or un-suspend making updates to the status line.
See also:
TecUtilDrawGraphics, TecUtilWorkAreaSuspend, TecUtilInterfaceSuspend
Python Syntax:
  Results = TecUtil.StatusSuspend(DoSuspend)

  Input:
                  DoSuspend            boolean
  Output:
    Results[0]    ReturnVal            NONE

char* TecUtilStringAlloc ( int  MaxLength,
const char *  DebugInfo 
)

Allocate a character string.

Use TecUtilStringDealloc() to deallocate strings allocated using TecUtilStringAlloc(). For the Tecplot ADK ActiveX Component, this function is not currently supported and is never required to be used.

Parameters:
MaxLength The usable length of the string. The size must be greater than or equal to zero
DebugInfo Character string identifying the reason why the string is being allocated. This parameter is not yet enabled, but you still must supply a string
Returns:
Returns the address of the string or NULL if the memory cannot be allocated.
Python Syntax:
    This function is not supported in Python.

The following example will allocate a string for displaying an error message and then deallocate it.

   char *S;
   S = TecUtilStringAlloc(80,"error message string");
   sprintf(S, "The error occurred on step %d", IStep);
   TecUtilDialogErrMsg(S);
   TecUtilStringDealloc(&S);

char* TecUtilStringConvOldFormatting ( const char *  OldString,
Font_e  BaseFont 
)

Convert a text string using the old formatting syntax into the new formatting syntax.

Parameters:
OldString Character string containing old formatting syntax.
BaseFont Assumed base font used by the old string.
Returns:
Returns the converted character string. You must free this string when you are finished with it.
Fortran Syntax:
    SUBROUTINE TecUtilStringConvOldFormatting(
   &           OldString,
   &           BaseFont,
   &           Result,
   &           ResultLength)
    CHARACTER*(*)   OldString
    INTEGER*4       BaseFont
    CHARACTER*(*)   Result
    INTEGER*4       ResultLength

Python Syntax:

    This function is not supported in Python.

void TecUtilStringDealloc ( char **  S  ) 

Free a string previously allocated with TecUtilStringAlloc(), or one that was allocated and returned as the result of calling any other TecUtilXxx function.

For the Tecplot ADK ActiveX Component, this function is not currently supported and is never required to be used.

Parameters:
S Reference to a valid string handle. Use TecUtilStringAlloc() to create a string
Fortran Syntax:
    SUBROUTINE TecUtilStringDealloc(
   &           S,
   &           SLength)
    CHARACTER*(*)   S
    INTEGER*4       SLength

Python Syntax:

    This function is not supported in Python.

Boolean_t TecUtilSystem ( const char *  Command,
Boolean_t  Wait 
)

Instruct Tecplot to submit and execute an operating system specific command.

Parameters:
Command Operating system specific command to execute
Wait If TRUE then Tecplot will wait for the command to finish processing. If FALSE then the command is run concurrently in another process and Tecplot returns immediately
Returns:
On UNIX platforms, TRUE is returned if there is a shell to execute (such as /bin/ksh). On Windows platforms, TRUE is returned if the process is successfully created. Otherwise, FALSE.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilSystem(
   &                   Command,
   &                   Wait)
    CHARACTER*(*)   Command
    INTEGER*4       Wait

Python Syntax:

  Results = TecUtil.System(Command, Wait)

  Input:
                  Command              string
                  Wait                 boolean
  Output:
    Results[0]    ReturnVal            boolean

Use the polygrid utility supplied with Tecplot to translate a PolyGrid file to a Tecplot ASCII input data file.

   TecUtilSystem("polygrid < sphere.pol > sphere.dat", TRUE);

char* TecUtilTecplotGetExePath ( void   ) 

Get the full path name of the Tecplot executable.

Since:
11.0-2-005
Returns:
If successful, an allocated string is returned containing the full path name to the Tecplot executable, otherwise NULL if unsuccessful.
See also:
TecUtilGetBasePath, TecUtilAddOnGetPath, TecUtilTecplotGetHomeDirectory
Fortran Syntax:
    SUBROUTINE TecUtilTecplotGetGetExecPath(
   &           Result,
   &           ResultLength)
    CHARACTER*(*)   Result
    INTEGER*4       ResultLength

Python Syntax:

  Results = TecUtil.TecplotGetExePath()

  Output:
    Results[0]    ReturnVal            string

Get the full path to the Tecplot executable.

   TecUtilLockStart(AddOnID);
   TecplotExePath = TecUtilTecplotGetExePath();
   .....
   TecUtilStringDealloc(&TecplotExePath);
   TecUtilLockFinish(AddOnID);

char* TecUtilTecplotGetHomeDirectory ( void   ) 

Get the Tecplot home directory.

Returns:
The Tecplot home directory. This is specified by the TECxxxHOME environment variable, or the -h flag used when launching Tecplot from the command line.
Fortran Syntax:
    SUBROUTINE TecUtilTecplotGetHomeDirectory(
   &           Result,
   &           ResultLength)
    CHARACTER*(*)   Result
    INTEGER*4       ResultLength

Python Syntax:

  Results = TecUtil.TecplotGetHomeDirectory()

  Output:
    Results[0]    ReturnVal            string

Get the Tecplot home directory.

   char *TecHome = NULL;
   
   TecUtilLockStart(AddOnID);
   TecHome = TecUtilTecplotGetHomeDirectory();
   .....
   TecUtilStringDealloc(&TecHome);
   TecUtilLockFinish(AddOnID);

SmInteger_t TecUtilTecplotGetMajorRevision ( void   ) 

Gets Tecplot's major revision number.

Tecplot's version number has the form: "MajorVersion.MinorVersion-MajorRevision-MinorRevision". Each part can be obtained separately.

Since:
10.0-3-129
Returns:
Tecplot's major revision number.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilTecplotGetMajorRevision()

Python Syntax:

  Results = TecUtil.TecplotGetMajorRevision()

  Output:
    Results[0]    ReturnVal            int

See also:
TecUtilTecplotGetMajorVersion(), TecUtilTecplotGetMinorVersion(), TecUtilTecplotGetMinorRevision()

SmInteger_t TecUtilTecplotGetMajorVersion ( void   ) 

Gets Tecplot's major version number.

Tecplot's version number has the form: "MajorVersion.MinorVersion-MajorRevision-MinorRevision". Each part can be obtained separately.

Since:
10.0-3-129
Returns:
Tecplot's major version number.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilTecplotGetMajorVersion()

Python Syntax:

  Results = TecUtil.TecplotGetMajorVersion()

  Output:
    Results[0]    ReturnVal            int

See also:
TecUtilTecplotGetMinorVersion(), TecUtilTecplotGetMajorRevision(), TecUtilTecplotGetMinorRevision()

SmInteger_t TecUtilTecplotGetMinorRevision ( void   ) 

Gets Tecplot's minor revision number.

Tecplot's version number has the form: "MajorVersion.MinorVersion-MajorRevision-MinorRevision". Each part can be obtained separately.

Since:
10.0-3-129
Returns:
Tecplot's minor revision number.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilTecplotGetMinorRevision()

Python Syntax:

  Results = TecUtil.TecplotGetMinorRevision()

  Output:
    Results[0]    ReturnVal            int

See also:
TecUtilTecplotGetMajorVersion(), TecUtilTecplotGetMinorVersion(), TecUtilTecplotGetMajorRevision()

SmInteger_t TecUtilTecplotGetMinorVersion ( void   ) 

Gets Tecplot's minor version number.

Tecplot's version number has the form: "MajorVersion.MinorVersion-MajorRevision-MinorRevision". Each part can be obtained separately.

Since:
10.0-3-129
Returns:
Tecplot's minor version number.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilTecplotGetMinorVersion()

Python Syntax:

  Results = TecUtil.TecplotGetMinorVersion()

  Output:
    Results[0]    ReturnVal            int

See also:
TecUtilTecplotGetMajorVersion(), TecUtilTecplotGetMajorRevision(), TecUtilTecplotGetMinorRevision()

Boolean_t TecUtilThreadCreateDetached ( ThreadFunction_pf  ThreadFunction,
ThreadData_t  ThreadData 
)

Create a new thread.

The thread will execute the specified function with the specified client data.

Since:
11.2-0-374
Parameters:
ThreadFunction Function called with the new thread.
ThreadData Client data for the newly created thread.
Returns:
Returns TRUE if the thread was successfully created otherwise FALSE.
Fortran Syntax:
   This function is not available for FORTRAN.

Python Syntax:

    This function is not supported in Python.

Create a new thread that executes a function called SpawnedFunction.

   if (!TecUtilThreadCreateDetached(SpawnedFunction,(ThreadData_t)0))
     {
        // 
        // Do something to handle thread failure.  System likely is 
        // in serious trouble.
        //
     }

Mutex_pa TecUtilThreadMutexAlloc ( void   ) 

Allocates and initializes a new thread mutex for use with the mutex.

locking and unlocking functions. See also TecUtilThreadMutexDealloc(), TecUtilThreadMutexLock() and TecUtilThreadMutexUnlock().

Since:
11.0-0-089
Returns:
Returns the newly allocated Mutex.
Fortran Syntax:
    SUBROUTINE TecUtilThreadMutexAlloc(
   &           MutexPtr)
    POINTER       (MutexPtr,Mutex)

Python Syntax:

    This function is not supported in Python.

Allocate and use a mutex to make a section of code thread-safe. In reality, the mutex should be allocated in a thread-safe portion of the code, such as the add-on's InitTecAddOn routine, and freed only when there is no chance it will be locked on again:

   extern Mutex_pa Mutex;

   if (!Mutex)
     {
       Mutex = TecUtilThreadMutexAlloc();
     }

   TecUtilThreadMutexLock(Mutex);

   // do some operation involving global data 
             .
             .
             .
   TecUtilThreadMutexUnlock(Mutex);

   // get rid of the mutex 
   TecUtilThreadMutexDealloc(&Mutex);

void TecUtilThreadMutexDealloc ( Mutex_pa Mutex  ) 

Deallocates thread mutex previously allocated with TecUtilThreadMutexAlloc().

The mutex must not be locked when this routine is called. See also TecUtilThreadMutexLock() and TecUtilThreadMutexUnlock().

Since:
11.0-0-089
Parameters:
Mutex Pointer to the mutex to be deallocated.
Fortran Syntax:
    SUBROUTINE TecUtilThreadMutexDealloc(
   &           MutexPtr)
    POINTER       (MutexPtr,Mutex)

Python Syntax:

    This function is not supported in Python.

void TecUtilThreadMutexLock ( Mutex_pa  Mutex  ) 

Lock on a thread mutex previously allocated with TecUtilThreadMutexAlloc().

Returns only when the lock is available. See also TecUtilThreadMutexDealloc() and TecUtilThreadMutexUnlock().

Since:
11.0-0-089
Parameters:
Mutex The mutex to be locked.
Fortran Syntax:
    SUBROUTINE TecUtilThreadMutexLock(
   &           MutexPtr)
    POINTER       (MutexPtr,Mutex)

Python Syntax:

    This function is not supported in Python.

void TecUtilThreadMutexUnlock ( Mutex_pa  Mutex  ) 

Unlock on a thread mutex previously locked with TecUtilThreadMutexLock().

See also TecUtilThreadMutexAlloc() and TecUtilThreadMutexDealloc().

Since:
11.0-0-089
Parameters:
Mutex The mutex to be unlocked.
Fortran Syntax:
    SUBROUTINE TecUtilThreadMutexUnlock(
   &           MutexPtr)
    POINTER       (MutexPtr,Mutex)

Python Syntax:

    This function is not supported in Python.

Boolean_t TecUtilTimerAddCallback ( UInt32_t  Interval,
ArbParam_t  ClientData,
AddOnTimerCallback_pf  TimerCallback 
)

Adds a timer callback, a function which is called by Tecplot at a set interval of time.

Note:
In your timer callback you must check to see if Tecplot is locked before calling any TecUtil functions, as illustrated in the source code example.
Parameters:
Interval Timeout interval in milliseconds.
ClientData This can be any 32-bit value and will be passed to the timer callback. Typically this is a pointer to a structure
TimerCallback Function to be called at each timeout interval. This function should return TRUE to continue the timer, or FALSE to stop it.
Returns:
TRUE if the callback was successfully added, FALSE otherwise. This function returns FALSE only if Tecplot is unable to obtain a timer from the operating system.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilTimerAddCallback(
   &                   Interval,
   &                   ClientDataPtr,
   &                   TimerCallback)
    INTEGER*4          Interval
    POINTER            (ClientDataPtr, ClientData)
    EXTERNAL           TimerCallback

Python Syntax:

    This function is not supported in Python.

Set up a timer with an interval of one second.

   static Boolean_t MyTimerCallback(ArbParam_t MyData)
   {
     if (!TecUtilLockIsOn())
       {
         // Tecplot isn't currently locked, so it's safe to call TecUtil functions 
         TecUtilLockStart(AddOnID); // Lock Tecplot for ourselves
   
         // ... Do processing with TecUtil functions
   
         // Release Tecplot for other addons
         TecUtilLockFinish(AddOnID); 
       }
     else
       {
         // Another add-on has locked Tecplot. It is NOT safe to
         // call any TecUtil functions, so do nothing.
       }
   
     // Return TRUE to continue the timer, return FALSE to stop the timer.
     return TRUE; 
   }
   // Make the above function called every second.
   TecUtilTimerAddCallback(1000,NULL,MyTimerCallback);

Note:
For a complete example of an add-on which uses timers, see the timetest sample add-on.
See also:
TecUtilOnIdleQueueAddCallback()

void TecUtilToolbarActivate ( Boolean_t  Activate  ) 

Specifies whether to show the Tecplot toolbar ore not.

Parameters:
Activate Set to TRUE to show the toolbar, FALSE to hide it
Fortran Syntax:
   SUBROUTINE TecUtilToolbarActivate(
  &           Activate)
   INTEGER*4      Activate

Python Syntax:

  Results = TecUtil.ToolbarActivate(Activate)

  Input:
                  Activate             boolean
  Output:
    Results[0]    ReturnVal            NONE

void TecUtilWorkAreaSuspend ( Boolean_t  DoSuspend  ) 

Suspends or un-suspends updates to the work area only.

Updates to the sidebar, menu, and status line are still preformed unless suspended via a call to TecUtilDrawGraphics(), TecUtilInterfaceSuspend() or TecUtilStatusSuspend().

Since:
11.0-3-010
Parameters:
DoSuspend Indicates if Tecplot should suspend or un-suspend making updates to the work area.
See also:
TecUtilDrawGraphics, TecUtilInterfaceSuspend, TecUtilStatusSuspend
Python Syntax:
  Results = TecUtil.WorkAreaSuspend(DoSuspend)

  Input:
                  DoSuspend            boolean
  Output:
    Results[0]    ReturnVal            NONE

Boolean_t TecUtilWriteCurveInfo ( const char *  FName,
EntIndex_t  XYMapNum,
ProcessXYMode_e  ProcessXYMode 
)

Deprecated:
Please use TecUtilCurveWriteInfo() instead.


Generated on Wed Dec 19 02:19:05 2007 for Tecplot by  doxygen 1.5.2-20070506