Functions | |
void | TecUtilAddOnAllowUnload (AddOn_pa AddOnID, Boolean_t DoAllowUnload) |
Allow or disallow the unloading of an add-on on Tecplot exit. | |
Boolean_t | TecUtilAddOnLoad (const char *LibName, const char *NotUsed, int NotUsed2) |
Load an add-on into Tecplot. | |
void | TecUtilAddOnRegisterInfo (const char *OfficialName, const char *Version, const char *Author) |
| |
AddOn_pa | TecUtilAddOnRegister (int TecplotBaseVersionNumber, const char *OfficialName, const char *Version, const char *Author) |
Register information about your add-on with Tecplot. | |
Boolean_t | TecUtilAddOnGetRegisteredInfo (const char *OfficialName, char **Version, char **Author) |
Query Tecplot's list of loaded addons for the specified add-on's version and author strings. | |
char * | TecUtilAddOnGetPath (AddOn_pa AddOnID) |
Gets full path name, including the library name, of the specified add-on library. |
Allow or disallow the unloading of an add-on on Tecplot exit.
Some add-ons have demonstrated crashing problems if unloaded before Tecplot exits. Often this is due to a 3rd party library linked with the add-on that registers with the operating system what is typically called an "atexit" function to automatically perform cleanup operations when the loading program exits if the client neglects to perform them. This is a very bad thing for a dynamically loaded/unloaded library to do. Well written libraries usually provide an API for cleaning up and preventing the registration of an "atexit" function. In the event that a 3rd party library does not provide an API you may have to prevent the add-on from being unloaded by Tecplot with this function.
AddOnID | ID of the add-on | |
DoAllowUnload | Set to FALSE to disable unloading of the add-on on Tecplot exit. Set to TRUE to allow unloading (the default). |
SUBROUTINE TecUtilAddOnAllowUnload( & AddOnIDPtr, & DoAllowUnload) POINTER (AddOnIDPtr, AddOnID) INTEGER*4 DoAllowUnload
Python Syntax:
This function is not supported in Python.
Instruct Tecplot to no unload the add-on, identified by its AddOnID, before Tecplot exits.
TecUtilAddOnAllowUnload(AddonID,FALSE);
char* TecUtilAddOnGetPath | ( | AddOn_pa | AddOnID | ) |
Gets full path name, including the library name, of the specified add-on library.
The result can subsequently be passed to TecUtilGetBasePath() to strip the library name from the path name.
AddOnID | Add-on identifier of the library of interest. |
SUBROUTINE TecUtilAddOnGetPath( & Result, & ResultLength) CHARACTER*(*) Result INTEGER*4 ResultLength
Python Syntax:
This function is not supported in Python.
Get the base path of this add-on library.
TecUtilLockStart(AddOnID); char *LibraryFullPath = TecUtilAddOnGetPath(AddOnID); if (LibraryFullPath) { char *LibraryBasePath = TecUtilGetBasePath(LibraryFullPath); if (LibraryBasePath) { . . TecUtilStringDealloc(&LibraryBasePath); } TecUtilStringDealloc(&LibraryFullPath); } TecUtilLockFinish(AddOnID);
Boolean_t TecUtilAddOnGetRegisteredInfo | ( | const char * | OfficialName, | |
char ** | Version, | |||
char ** | Author | |||
) |
Query Tecplot's list of loaded addons for the specified add-on's version and author strings.
OfficialName | Official name of the add-on. This is the same unique name with which an add-on was registered. | |
Version | A pointer to a character pointer. If the add-on is loaded, *Version is assigned a copy of the add-on's version string, otherwise a value of NULL is assigned. You must free this string with TecUtilStringDealloc(). | |
Author | A pointer to a character pointer. If the add-on is loaded, *Author is assigned a copy of the add-on's version string, otherwise a value of NULL is assigned. You must free this string with TecUtilStringDealloc(). |
Version Pointer must be a valid address or NULL.
Author Pointer must be a valid address or NULL.
INTEGER*4 FUNCTION TecUtilAddOnGetRegisteredInfo( & OfficialName, & Version, & VersionLength, & Author, & AuthorLength) CHARACTER*(*) OfficialName CHARACTER*(*) Version INTEGER*4 VersionLength CHARACTER*(*) Author INTEGER*4 AuthorLength
Python Syntax:
Results = TecUtil.AddOnGetRegisteredInfo(OfficialName) Input: OfficialName string Output: Results[0] ReturnVal boolean Results[1] Version string Results[2] Author string
To find out if the add-on Circular Stream is loaded into Tecplot:
char *version = NULL; char *author = NULL; if (TecUtilAddOnGetRegisteredInfo("Circular Stream".&version, &author)) { // Circular Stream loaded, do something special DeallocString(&version); DeallocString(&author); }
Boolean_t TecUtilAddOnLoad | ( | const char * | LibName, | |
const char * | NotUsed, | |||
int | NotUsed2 | |||
) |
LibName | Name of add-on file. | |
NotUsed | Pass NULL for this parameter. | |
NotUsed2 | Pass 0 for this parameter. |
INTEGER*4 FUNCTION TecUtilAddOnLoad( & LibName, & NotUsed, & NotUsed2) CHARACTER*(*) LibName CHARACTER*(*) NotUsed INTEGER*4 NoUsed2
Python Syntax:
This function is not supported in Python.
To load the add-on cstream use:
if (!TecTuilAddOnLoad("cstream", NULL, 0)) { // failed to load cstream add-on }
AddOn_pa TecUtilAddOnRegister | ( | int | TecplotBaseVersionNumber, | |
const char * | OfficialName, | |||
const char * | Version, | |||
const char * | Author | |||
) |
Register information about your add-on with Tecplot.
This information will mainly be used in an add-on information dialog accessible via the Help menu option.
TecplotBaseVersionNumber | Usually this is a hard coded integer value reflecting the version number of Tecplot at the time the add-on was written. By providing this number Tecplot can make assumptions about what capabilities the add-on writer was aware of at the time of writing. For example, by supplying a value of 100 Tecplot assumes that the add-on knows how to deal with shared variables since they were first introduced in base version 10. For Tecplot version 11 (aka Tecplot 360) use a value of 110. | |
OfficialName | The official name of your add-on. | |
Version | A string indicating the version of your add-on. | |
Author | A string indicating the author of the add-on (usually the company name). |
OfficialName Pointer must be a valid address and non-NULL.
Version Pointer must be a valid address and non-NULL.
Author Pointer must be a valid address and non-NULL.
AddOnBeingInitialized This function may only be called during add-on initialization.
SUBROUTINE TecUtilAddOnRegister( & TecplotBaseVersionNumber, & OfficialName, & Version, & Author, & ResultPtr) INTEGER*4 TecplotBaseVersionNumber CHARACTER*(*) OfficialName CHARACTER*(*) Version CHARACTER*(*) Author POINTER (ResultPtr, Result)
Python Syntax:
This function is not supported in Python.
To register an add-on called Circular Stream from Tecplot, Inc.:
AddOn_pa AddOnID; void InitTecAddOn(void) { TecUtilLockOn(); AddOnID=TecUtilAddOnRegister(100,"Circular Stream", "1.0 - 05/01/1998", "Tecplot, Inc."); // other initialization TecUtilLockOff(); }
void TecUtilAddOnRegisterInfo | ( | const char * | OfficialName, | |
const char * | Version, | |||
const char * | Author | |||
) |
Python Syntax:
This function is not supported in Python.