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. | |
| 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).
| Array | Pointer to the Array to be deallocated. |
SUBROUTINE TecUtilArrayDealloc(Array) POINTER (ArrayPtr, Array)
Python Syntax:
This function is not supported in Python.
Delay Tecplot execution for a specified time.
| Seconds | Number of seconds to delay |
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.
| 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. |
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.
| DoubleBufferAction | Action to take. The possible values are: |
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:
SUBROUTINE TecUtilDropOpeningBanner()
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.
| 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 |
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.
| TempFileName | Receives the temporary file name, including path. You must later free this string with TecUtilStringDealloc() |
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.
| *URLFName | A string containing the URL to test |
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.
| 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 |
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.
| FName | File name. A NULL file name is allowed in which case the startup directory is returned |
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.
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.
| ExportFormat | The format in which an image will be exported. | |
| ExportRegion | The region of the plot that will be exported. |
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 | ) |
| Boolean_t TecUtilGetTempFileName | ( | char ** | TempFileName | ) |
| 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.
| 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. |
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.
| ArgList | Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions. Arglist Values SV_CONVERTTO256COLORS
SV_IMAGEWIDTH
SV_EXPORTREGION
|
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:
SUBROUTINE TecUtilImageBitmapDestroy()
Python Syntax:
Results = TecUtil.ImageBitmapDestroy()
Output:
Results[0] ReturnVal NONE
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.
| 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. |
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.
| 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 |
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().
| 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. |
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.
| 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(). |
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().
| Region | Region to export. Must be a valid region |
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.
{
TecUtilLockStart(AddOnID);
if (TecUtilImageRGBBitmapCreate(BitDumpRegion_CurrentFrame))
{
// Do the export
TecUtilImageBitmapDestroy();
}
TecUtilLockFinish(AddOnID);
}
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.
| 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 |
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.
| VDotsPerInch | The number of pixels per inch in the vertical direction | |
| HDotsPerInch | The number of pixels per inch in the horizontal direction. |
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().
| DoSuspend | Indicates if Tecplot should suspend or un-suspend making updates to the interface. |
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.
INTEGER*4 FUNCTION TecUtilInterruptCheck()
Python Syntax:
Results = TecUtil.InterruptCheck()
Output:
Results[0] ReturnVal boolean
| 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.
| AddOn | The add-on id from which the function is called |
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.
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.
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.
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.
| AddOn | The add-on id from which the function is called |
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.
| 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. |
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.)
| 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). |
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:
SUBROUTINE TecUtilPopMainProcessWindow()
Python Syntax:
Results = TecUtil.PopMainProcessWindow()
Output:
Results[0] ReturnVal NONE
| 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.
| 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 |
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.
TecUtilPublish("mydoc.htm", TRUE, ImageSelection_OnePerFrame);
| 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().
INTEGER*4 FUNCTION TecUtilQuit()
Python Syntax:
Results = TecUtil.Quit()
Output:
Results[0] ReturnVal boolean
Exit Tecplot:
TecUtilLockStart(AddOnID); TecUtilQuit(); TecUtilLockFinish(AddOnID);
| 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.
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.
| FileName | Script file name to execute. |
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.
| 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. |
This function is not supported in Python.
| Boolean_t TecUtilScriptProcessorGetClientData | ( | const char * | ScriptExtension, | |
| ArbParam_t * | ClientData | |||
| ) |
Returns client data associated with a script processor.
| ScriptExtension | An extension for which the script processor was registered. | |
| ClientData | A pointer to an ArbParam_t variable to receive the client data. |
This function is not supported in Python.
| Boolean_t TecUtilStatusCheckPercentDone | ( | int | PercentDone | ) |
Tells the status line what percentage of the task is complete.
| PercentDone | Integer value between 0 and 100 indicating the progress of the operation. |
INTEGER*4 FUNCTION TecUtilStatusCheckPercentDone(PercentDone) INTEGER*4 PercentDone
Python Syntax:
Results = TecUtil.StatusCheckPercentDone(PercentDone)
Input:
PercentDone int
Output:
Results[0] ReturnVal boolean
| 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:
SUBROUTINE TecUtilStatusFinishPercentDone()
Python Syntax:
Results = TecUtil.StatusFinishPercentDone()
Output:
Results[0] ReturnVal NONE
| void TecUtilStatusSetPercentDoneText | ( | const char * | PercentDoneText | ) |
Sets the string to displayed on the percent done status line.
| PercentDoneText | String to displayed. |
SUBROUTINE TecUtilStatusSetPercentDoneText(PercentDoneText) CHARACTER*(*) PercentDoneText
Python Syntax:
Results = TecUtil.StatusSetPercentDoneText(PercentDoneText)
Input:
PercentDoneText string
Output:
Results[0] ReturnVal NONE
| 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.
| 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. |
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
| 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().
| DoSuspend | Indicates if Tecplot should suspend or un-suspend making updates to the status line. |
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.
| 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 |
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.
| OldString | Character string containing old formatting syntax. | |
| BaseFont | Assumed base font used by the old string. |
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.
| S | Reference to a valid string handle. Use TecUtilStringAlloc() to create a string |
SUBROUTINE TecUtilStringDealloc( & S, & SLength) CHARACTER*(*) S INTEGER*4 SLength
Python Syntax:
This function is not supported in Python.
Instruct Tecplot to submit and execute an operating system specific command.
| 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 |
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.
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.
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.
INTEGER*4 FUNCTION TecUtilTecplotGetMajorRevision()
Python Syntax:
Results = TecUtil.TecplotGetMajorRevision()
Output:
Results[0] ReturnVal int
| 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.
INTEGER*4 FUNCTION TecUtilTecplotGetMajorVersion()
Python Syntax:
Results = TecUtil.TecplotGetMajorVersion()
Output:
Results[0] ReturnVal int
| 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.
INTEGER*4 FUNCTION TecUtilTecplotGetMinorRevision()
Python Syntax:
Results = TecUtil.TecplotGetMinorRevision()
Output:
Results[0] ReturnVal int
| 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.
INTEGER*4 FUNCTION TecUtilTecplotGetMinorVersion()
Python Syntax:
Results = TecUtil.TecplotGetMinorVersion()
Output:
Results[0] ReturnVal int
| 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.
| ThreadFunction | Function called with the new thread. | |
| ThreadData | Client data for the newly created thread. |
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().
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().
| Mutex | Pointer to the mutex to be deallocated. |
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().
| Mutex | The mutex to be locked. |
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().
| Mutex | The mutex to be unlocked. |
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.
| 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. |
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);
| void TecUtilToolbarActivate | ( | Boolean_t | Activate | ) |
Specifies whether to show the Tecplot toolbar ore not.
| Activate | Set to TRUE to show the toolbar, FALSE to hide it |
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().
| DoSuspend | Indicates if Tecplot should suspend or un-suspend making updates to the work area. |
Results = TecUtil.WorkAreaSuspend(DoSuspend)
Input:
DoSuspend boolean
Output:
Results[0] ReturnVal NONE
| Boolean_t TecUtilWriteCurveInfo | ( | const char * | FName, | |
| EntIndex_t | XYMapNum, | |||
| ProcessXYMode_e | ProcessXYMode | |||
| ) |
1.5.2-20070506