AddOn Management


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.


Function Documentation

void TecUtilAddOnAllowUnload ( AddOn_pa  AddOnID,
Boolean_t  DoAllowUnload 
)

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.

Parameters:
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).
Precondition:
AddOnID Pointer must be a valid address and non-NULL.
Fortran Syntax:
    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.

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.

Since:
11.0-2-005
Parameters:
AddOnID Add-on identifier of the library of interest.
Returns:
If successful, an allocated string is returned containing the full path name to the add-on library, otherwise NULL if unsuccessful.
See also:
TecUtilGetBasePath, TecUtilTecplotGetExePath, TecUtilTecplotGetHomeDirectory
Precondition:
AddOnID Pointer must be a valid address and non-NULL.
Fortran Syntax:
    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.

Parameters:
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().
Returns:
Returns TRUE if the add-on is loaded, FALSE if not.
Precondition:
OfficialName String must have a valid address and non-zero length.

Version Pointer must be a valid address or NULL.

Author Pointer must be a valid address or NULL.

Fortran Syntax:
    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 
)

Load an add-on into Tecplot.

Parameters:
LibName Name of add-on file.
NotUsed Pass NULL for this parameter.
NotUsed2 Pass 0 for this parameter.
Returns:
Returns TRUE if the add-on was successfully loaded, otherwise, FALSE.
Precondition:
LibName String must have a valid address and non-zero length.
Fortran Syntax:
    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.

Note:
This function must be called from within your add-on initialization function, and cannot be called from anywhere else.
Parameters:
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).
Precondition:
TecplotBaseVersionNumber >= 100 Tecplot version number must be at least 100.

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.

Fortran Syntax:
    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 
)

Deprecated:
Please use TecUtilAddOnRegister() instead.

Python Syntax:

    This function is not supported in Python.


Generated on Tue Mar 12 02:24:40 2013 for Tecplot by  doxygen 1.5.5