State Changes


Functions

Boolean_t TecUtilStateChangeSetMode (StateChangeAddOnCallback_pf Callback, StateChangeMode_e Mode)
  Set the mode in which state changes are propagated to the specified state change callback.
Boolean_t TecUtilStateChangeAddCallback (StateChangeAddOnCallback_pf StateChangeCallback)
  Include a function in the list of functions to call when a state change occurs in Tecplot.
void TecUtilStateChanged (StateChange_e StateChange, ArbParam_t CallData)
  Inform tecplot of a state change.
Boolean_t TecUtilStateChangeRemoveCBX (ArgList_pa ArgList)
  Remove a previously added callback from Tecplot's list of add-on state change callbacks.
Boolean_t TecUtilStateChangeRemoveCallback (void *AddOnStateChangeCallback)
  Remove a previously added callback from Tecplot's list of add-on state change callbacks.
Boolean_t TecUtilStateChangeAddCallbackX (ArgList_pa ArgList)
  Add a callback to Tecplot's list of add-on's to receive state changes notifications.
Boolean_t TecUtilStateChangeGetIndex (LgIndex_t *Index)
  Retrieve Index supplemental information from the previous state change.
Boolean_t TecUtilStateChangeGetPageUniqueID (UniqueID_t *UniqueID)
  Retrieve the page UniqueID supplemental information from the previous state change.
Boolean_t TecUtilStateChangeGetFrameUniqueID (UniqueID_t *UniqueID)
  Retrieve the frame UniqueID supplemental information from the previous state change.
Boolean_t TecUtilStateChangeGetDataSetUniqueID (UniqueID_t *UniqueID)
  Retrieve the dataset UniqueID supplemental information from the previous state change.
Boolean_t TecUtilStateChangeGetUniqueID (UniqueID_t *UniqueID)
  Retrieve UniqueID supplemental information from the previous state change.
Boolean_t TecUtilStateChangeGetArbEnum (LgIndex_t *ArbEnum)
  Retrieve enumerated supplemental information from the previous state change.
Boolean_t TecUtilStateChangeGetZoneSet (Set_pa *ZoneSetRef)
  Retrieve a reference to the set of zones associated with the previous state change.
Boolean_t TecUtilStateChangeGetVarSet (Set_pa *VarSetRef)
  Retrieve a reference to the set of variables associated with the previous state change.
Boolean_t TecUtilStateChangeGetName (char **NameRef)
  Retrieve a reference to the name associated with the previous state change.
Boolean_t TecUtilStateChangeGetMap (EntIndex_t *Map)
  Retrieve a reference to the map associated with the previous state change.
Boolean_t TecUtilStateChangeGetZone (EntIndex_t *Zone)
  Retrieve the number of the zone associated with the previous state change.
Boolean_t TecUtilStateChangeGetVar (EntIndex_t *Var)
  Retrieve a reference to the variable associated with the previous state change.
Boolean_t TecUtilStateChangeGetStyleParam (int Param, const char **StyleParam)
  Retrieve one of the P1,P2,P3,P4,P5,P6, or P7 style parameters from the previous style state change.
void TecUtilStateChangeGetInfoX (ArgList_pa ArgList)
  Retrieve the P1,P2,P3,P4,P5 style parameters from the previous style state change.
void TecUtilStateChangedX (ArgList_pa ArgList)
  Inform Tecplot of a state change.


Function Documentation

Boolean_t TecUtilStateChangeAddCallback ( StateChangeAddOnCallback_pf  StateChangeCallback  ) 

Include a function in the list of functions to call when a state change occurs in Tecplot.

For more detailed discussion, either see TecUtilOnIdleQueueAddCallback() or the ADK User's Manual. If you want to take advantage of newer capabilities with regard to state changes then use TecUtilStateChangeAddCallbackX() instead.

Parameters:
StateChangeCallback This is the name of the callback function you provide. This function will be called by Tecplot each time a state change occurs. See
Returns:
Returns TRUE if callback has been added. Returns FALSE only if there is not enough room to allocate space for an additional callback (highly unlikely).
The following example will set up a state change callback. This callback will do the following:

  1. When the user picks an object, check and see if it is a zone. If it is, then change its color to red.
  2. If anything has happened to the fourth variable, then show an error message.
  3. If Tecplot is quitting, then close some files that are open.

First, in the Tecplot initialization code add the callback:

   IsOk=TecUtilStateChangeAddCallback(MyStateChangeCallback);

Fortran Syntax:

    INTEGER*4 FUNCTION TecUtilStateChangeAddCallback(StateChangeCallback)
    EXTERNAL StateChangeCallback

Python Syntax:

    This function is not supported in Python.

And add the state change callback:

   void MyStateChangeCallback(StateChange_e StateChange,
                                      ArbParam_t    CallData)
   {
     .
     .
     .
     //
     // Item 1.  Check for the case when the user picks a zone.
     //
     if (StateChange == StateChange_PickListSingleSelect)
       {
         int NumPickedObjects;
         NumPickedObjects = TecUtilPickListGetCount();

          //
          // Check to see if the last object picked is a zone.
          //
         if (TecUtilPickListGetType(NumPickedObjects)==
             PickObjects_Zone)
           {
             EntIndex_t ZonePicked;
             Set_pa     ZoneSet;

             // Get the number of the zone picked
             ZonePicked = TecUtilPickListGetZoneNumber(NumPickedObjects);

             //
             // Build the zone set to pass to TecUtilZoneSetMesh().
             // In this case there is only one zone
             //
             ZoneSet = TecUtilSetAlloc(FALSE);
             if (ZoneSet)
               {
                 TecUtilSetAddMember(ZoneSet,ZonePicked,TRUE);

                 //
                 // Change the mesh color attribute.
                 //
                 TecUtilZoneSetMesh(SV_COLOR, ZoneSet, 0.0,
                                    (ArbParam_t)Red_C);
                 TecUtilSetDealloc(&ZoneSet);
               }
           }
       }
       //
       // Item 2. Check for a change in the 4th variable.
       //
       else if (StateChange == StateChange_VarsAltered)
         {
           if (TecUtilSetIsMember((Set_pa)CallData, (SetIndex_t)4))
             TecUtilDialogErrMsg("Var number 4 was altered");
         }

       //
       // Item 3.  Close an open file if Tecplot is
       // shutting down.
       //
       else if (StateChange == StateChange_QuitTecplot)
         {
           fclose(SomeOpenFile);
         }
       .
       .
       .
     }

Boolean_t TecUtilStateChangeAddCallbackX ( ArgList_pa  ArgList  ) 

Add a callback to Tecplot's list of add-on's to receive state changes notifications.

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

Arglist Values

SV_STATECHANGEMODE
Type: StateChangeMode_e
Arg Function: TecUtilArgListAppendInt()
Default: StateChangeMode_V100
Required: No
Notes: Assigns the state change mode. Possible values are StateChangeMode_v75, StateChangeMode_v80, StateChangeMode_v100, and StateChangeMode_v113. See the section "Sending State Changes" in the "ADK User's Manual" for a complete description of the differences between these options.

SV_CALLBACKFUNCTION
Type: void *
Arg Function: TecUtilArgListAppendFunction()
Required: Yes
Notes: Callback Function for state changes. See discussion of StateChangeCallbackAPI below.

SV_STATECHANGECALLBACKAPI
Type: StateChangeCallbackAPI_e
Arg Function: TecUtilArgListAppendInt()
Default: StateChangeCallbackAPI_ChangeOnly
Required: No
Notes: Determines the API for the statechange callback function. Use StateChangeCallbackAPI_Classic if your callback uses StateChangeAddOnCallback_pf. Use StateChangeCallbackAPI_ChangeOnly if your callback uses StateChangeAddOnCallbackV2_pf Use StateChangeCallbackAPI_ChangePlusClient if your callback uses StateChangeAddOnCallbackWithClient_pf.

SV_CLIENTDATA
Type: ArbParam_t
Arg Function: TecUtilArgListAppendArbParam()
Default: 0
Required: No
Notes: Client data sent to callback if StateChangeCallbackAPI is set to StateChangeCallbackAPI_ChangePlusClient.


Returns:
TRUE if successful, FALSE otherwise.
Precondition:
ArgList Argument list must be valid.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeAddCallbackX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

    This function is not supported in Python.

Register the function MyStateChangeCallback with Tecplot using the "ChangeOnly" API:

   static void MyStateChangeCallback(StateChange_e StateChange)
   {
     TecUtilLockStart(AddOnID);
     switch (StateChange)
       {
         case StateChange_VarsAltered,
           {
             Set_pa VarsAlteredRef = NULL;
             if (TecUtilStateChangeGetVarSet(&VarsAlteredRef))
               {
                 Set_pa ZonesAlteredRef = NULL;
                 if (TecUtilStateChangeGetZoneSet(&ZonesAlteredRef))
                   {
                     ...take action knowing which vars in which
                     ...were altered.
                   }
                 else
                   {
                     ...assume all zones were affected.  Take action
                     ...knowing which vars were altered.
                   }
               }
           } break;
         ...and so on...
       }
     TecUtilLockFinish(AddOnID);
   }
   .
   .
   .
   void InitTecAddOn(void)
   {
     ArgList_pa ArgList;
     .
     .
     .
     ArgList = TecUtilArgListAlloc();
     TecUtilArgListAppendFunction(ArgList,
                                  SV_CALLBACKFUNCTION,
                                  MyStateChangeCallback);
     TecUtilStateChangeAddCallbackX(ArgList);
     TecUtilArgListDealloc(&ArgList);
     .
     .
     .
   }

Register the function MyStateChageCallback with Tecplot using the "ChangePlusClient" API:

   static void MyStateChangeCallback(StateChange_e StateChange,
                                     ArbParam_t    ClientData)
   {
     // Do something with ClientData....
     TecUtilLockStart(AddOnID);
     switch (StateChange)
       {
         case StateChange_VarsAltered,
           {
             Set_pa VarsAlteredRef = NULL;
             if (TecUtilStateChangeGetVarSet(&VarsAlteredRef))
               {
                 Set_pa ZonesAlteredRef = NULL;
                 if (TecUtilStateChangeGetZoneSet(&ZonesAlteredRef))
                   {
                     ...take action knowing which vars in which
                     ...were altered.
                   }
                 else
                   {
                     ...assume all zones were affected.  Take action
                     ...knowing which vars were altered.
                   }
               }
           } break;
         ... and so on...
       }
     TecUtilLockFinish(AddOnID);
   }
   .
   .
   .
   void InitTecAddOn(void)
   {
     ArgList_pa ArgList;
     ArbParam_t MyClientData;
     .
     . ...Assign something to MyClientData...
     .
     ArgList = TecUtilArgListAlloc();
     TecUtilArgListAppendFunction(ArgList,
                                  SV_CALLBACKFUNCTION,
                                  (const void *)MyStateChangeCallback);

     TecUtilArgListAppendInt(     ArgList,
                                  SV_STATECHANGECALLBACKAPI,
                                  (LgIndex_t)StateChangeCallbackAPI_ChangePlusClient);

     TecUtilArgListAppendArbParam(ArgList,
                                  SV_CLIENTDATA,
                                  MyClientData);

     TecUtilStateChangeAddCallbackX(ArgList);
     TecUtilArgListDealloc(&ArgList);
     .
     .
     .
   }

void TecUtilStateChanged ( StateChange_e  StateChange,
ArbParam_t  CallData 
)

Inform tecplot of a state change.

Currently this must be called in the following situations:

  • Launch and dismiss of modal dialogs (Windows only).
  • After a variable has been added and subsequently modified.
  • After a variable has been modified.
  • After TecUtilDataSetAddZone() has been called and the field data has been modified (Use StateChange_ZonesAdded).
  • After the node map has been altered.

The CallData parameter is required for the following state changes:

                                  CallData
     StateChange                  Type      Represents
     --------------------------------------------------------------------------
     StateChange_VarsAltered      Set_pa    set of variables altered
     StateChange_VarsAdded        Set_pa    set of variables added
     StateChange_ZonesAdded       Set_pa    set of zones added
     StateChange_NodeMapsAltered  Set_pa    set of zones where nodemaps were altered
   

Parameters:
StateChange Specifies the state change of which to inform Tecplot. addons are only allowed to send specific state change messages. See the ADK User's Manual
CallData Extra information for the state change.
Fortran Syntax:
    SUBROUTINE TecUtilStateChanged(
   &           StateChange,
   &           CallDataPtr)
    INTEGER*4       StateChange
    POINTER         (CallDataPtr, CallData)

Python Syntax:

  Results = TecUtil.StateChanged(StateChange, CallData)

  Input:
                  StateChange          StateChange_e  (defined in TecVals.py)
                  CallData             (depends on attribute)
  Output:
    Results[0]    ReturnVal            NONE

Create a zone, modify its variable values, and inform Tecplot of the state change:

   if (TecUtilDataSetAddZone("Banana", 10, 10, 1,
                             ZoneType_Ordered, NULL))
     {
       EntIndex_t Zone;
       Set_pa     ZSet = TecUtilSetAlloc(TRUE);
       TecUtilDataSetGetInfo(NULL, &Zone, NULL);

       //  Set up the variable values for the new zone

       TecUtilSetAddMember(ZSet, Zone,TRUE);
       TecUtilStateChanged(StateChange_ZonesAdded,(ArbParam_t)ZSet);
       TecUtilSetDealloc(&ZSet);
     }

void TecUtilStateChangedX ( ArgList_pa  ArgList  ) 

Inform Tecplot of a state change.

Parameters:
ArgList An argument list containing the appropriate entries described below. Arguments are added to the list via calls to TecUtilArgListAppendXXXX functions.


Arglist Values

SV_STATECHANGE
Type: StateChange_e
Arg Function: TecUtilArgListAppendInt()
Required: Yes
Notes: The state change to send to Tecplot. See sub-section "Sending state changes" in the ADK User's Manual for a list of possible state changes.

SV_VARLIST
Type: Set_pa
Arg Function: TecUtilArgListAppendSet()
Default: NULL
Required: No, (see below)

SV_ZONELIST
Type: Set_pa
Arg Function: TecUtilArgListAppendSet()
Default: NULL
Required: No, (see below)

SV_INDEX
Type: Set_pa
Arg Function: TecUtilArgListAppendSet()
Default: NULL
Required: No, (see below)


Note:
The SV_VARLIST, SV_ZONELIST and SV_INDEX arguments are required or optional based on the value of the state change argument. For a description of when you can and/or must supply these arguments see sub-section "Sending state changes" in the ADK User's Manual.
Returns:
TRUE if successful, FALSE otherwise.
Precondition:
Must have one or more frames.

ArgList Argument list must be valid.

Fortran Syntax:
    SUBROUTINE TecUtilStateChangedX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

  Results = TecUtil.StateChangedX(ArgList)

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

Inform tecplot that variables have been altered. Tell Tecplot that variable 2 in zones 3 and 4 has been altered.

 Set_pa     ZoneList = NULL;
 Set_pa     VarList  = NULL;
 ArgList_pa ArgList  = NULL;

 ArgList  = TecUtilArgListAlloc();
 ZoneList = TecUtilSetAlloc(FALSE);
 VarList  = TecUtilSetAlloc(FALSE);

 TecUtilSetAddMember(VarList,2,FALSE);

 TecUtilSetAddMember(ZoneList,3,FALSE);
 TecUtilSetAddMember(ZoneList,4,FALSE);

 TecUtilArgListAppendInt(ArgList,    SV_STATECHANGE,      StateChange_VarsAltered);
 TecUtilArgListAppendSet(ArgList,    SV_ZONELIST,         ZoneList);
 TecUtilArgListAppendSet(ArgList,    SV_VARLIST,          VarList);
 TecUtilStateChangedX(ArgList);

 TecUtilArgListDealloc(&ArgList);
 TecUtilSetDealloc(&ZoneList);
 TecUtilSetDealloc(&VarList);

Same example as above but for FORTRAN.

       INTEGER*4 DummyArgList
       pointer (ArgListPtr,DummyArgList)
       pointer (ZoneListPtr,DummyZoneList)
       INTEGER*4 DummyZoneList
       pointer (VarListPtr,DummyVarList)
       INTEGER*4 DummyVarList
       INTEGER*4 IShowErr,IErr

       IShowErr = 0

       Call TecUtilArgListAlloc(ArgListPtr)
       Call TecUtilSetAlloc(IShowErr,ZoneListPtr)
       Call TecUtilSetAlloc(IShowErr,VarListPtr)

       IErr = TecUtilSetAddMember(VarListPtr,2,IShowErr)

       IErr = TecUtilSetAddMember(ZoneListPtr,3,IShowErr)
       IErr = TecUtilSetAddMember(ZoneListPtr,4,IShowErr)

       IErr = TecUtilArgListAppendInt(ArgListPtr,
      &                               'STATECHANGE'//char(0),
      &                               StateChange_VarsAltered)
       IErr = TecUtilArgListAppendSet(ArgListPtr,
      &                               'ZONELIST'//char(0),
      &                               ZoneListPtr)
       IErr = TecUtilArgListAppendSet(ArgListPtr,
      &                               'VARLIST'//char(0),
      &                               VarListPtr)

       Call TecUtilStateChangedX(ArgListPtr)

       Call TecUtilArgListDealloc(ArgListPtr)
       Call TecUtilSetDealloc(ZoneListPtr)
       Call TecUtilSetDealloc(VarListPtr)

Boolean_t TecUtilStateChangeGetArbEnum ( LgIndex_t ArbEnum  ) 

Retrieve enumerated supplemental information from the previous state change.

Parameters:
ArbEnum Retrieved enumerated value from the previous state change. Type cast this to the appropriate enum to get the value
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
ArbEnum Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetArbEnum(ArbEnum)
    INTEGER*4 ArbEnum

Python Syntax:

    This function is not supported in Python.

Your state change callback was just called with StateChange_View. Take action if the view type was View_Zoom

     LgIndex_t ArbEnumValue;
     TecUtilStateChangeGetArbEnum(&ArbEnumValue);
     if ((View_e)ArbEnumValue == View_Zoom)
        {
           ....take some action.
        }

Boolean_t TecUtilStateChangeGetDataSetUniqueID ( UniqueID_t UniqueID  ) 

Retrieve the dataset UniqueID supplemental information from the previous state change.

Since:
11.3-7-003
Parameters:
UniqueID Retrieved dataset UniqueID value from the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
UniqueID Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetDataSetUniqueID(UniqueID)
    INTEGER*4 UniqueID

Python Syntax:

    This function is not supported in Python.

   UniqueID_t UniqueID;
   if (TecUtilStateChangeGetDataSetUniqueID(&UniqueID))
     {
       ....take some action using UniqueID.
     }

Boolean_t TecUtilStateChangeGetFrameUniqueID ( UniqueID_t UniqueID  ) 

Retrieve the frame UniqueID supplemental information from the previous state change.

Since:
11.3-7-003
Parameters:
UniqueID Retrieved frame UniqueID value from the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
UniqueID Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetFrameUniqueID(UniqueID)
    INTEGER*4 UniqueID

Python Syntax:

    This function is not supported in Python.

   UniqueID_t UniqueID;
   if (TecUtilStateChangeGetFrameUniqueID(&UniqueID))
     {
       ....take some action using UniqueID.
     }

Boolean_t TecUtilStateChangeGetIndex ( LgIndex_t Index  ) 

Retrieve Index supplemental information from the previous state change.

Since:
11.0-5-016
Parameters:
Index Retrieved Index value from the previous state change
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
Index Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetIndex(Index)
    INTEGER*4 Index

Python Syntax:

    This function is not supported in Python.

Your state change callback was just called with StateChange_VarsAltered. Take action if you can retrieve which data point index was altered.

     LgIndex_t IndexValue;
     if (TecUtilStateChangeGetIndex(&IndexValue))
       {
           ....take some action using IndexValue.
       }

void TecUtilStateChangeGetInfoX ( ArgList_pa  ArgList  ) 

Retrieve the P1,P2,P3,P4,P5 style parameters from the previous style state change.

As well as the Offset1, Offset2, and ObjectSet parameters.

This function is useful since the form is more consistent with the form required for calling TecUtilStyleSetLowLevelX and TecUtilStyleGetLowLevelX

Parameters:
ArgList An argument list containing the appropriate entries described below. Arguments are added to the list via calls to TecUtilArgListAppendXXXX functions.


Arglist Values

SV_P1
Type: char **
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: DO NOT FREE THIS STRING. NULL will be returned if the previous state change does not have a P1 parameter

SV_P2
Type: char **
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: DO NOT FREE THIS STRING. NULL will be returned if the previous state change does not have a P2 parameter

SV_P3
Type: char **
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: DO NOT FREE THIS STRING. NULL will be returned if the previous state change does not have a P3 parameter

SV_P4
Type: char **
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: DO NOT FREE THIS STRING. NULL will be returned if the previous state change does not have a P4 parameter

SV_P5
Type: char **
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: DO NOT FREE THIS STRING. NULL will be returned if the previous state change does not have a P5 parameter

SV_OFFSET1
Type: ArbParam_t *
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: IMPORTANT: You must supply a pointer to an ArbParam_t value for this parameter. You can later reassign the value to a LgIndex_t type if needed (most likely the case). An offset of -1 will be returned if Offset1 does not apply to the previous state change

SV_OFFSET2
Type: ArbParam_t *
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: IMPORTANT: You must supply a pointer to an ArbParam_t value for this parameter. You can later reassign the value to a LgIndex_t type if needed (most likely the case). An offset of -1 will be returned if Offset1 does not apply to the previous state change

SV_OBJECTSET
Type: Set_pa *
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: DO NOT FREE THIS SET. NULL will be returned if ObjectSet does not apply to the previous state change.


Python Syntax:

    This function is not supported in Python.

Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
ArgList Argument list must be valid.
    const char* P1;
    const char* P2;
    const char* P3;
    const char* P4;
    const char* P5;
    Set_pa objectSet = NULL;
    Arbparam_t offset1;
    Arbparam_t offset2;
    LgIndex_t  finalOffset1;
    LgIndex_t  finalOffset2;
    ArgList_pa argList = TecUtilArgListAlloc();
    TecUtilArgListAppendArbParamPtr(argList, SV_P1, (ArbParam_t*)&P1);
    TecUtilArgListAppendArbParamPtr(argList, SV_P2, (ArbParam_t*)&P2);
    TecUtilArgListAppendArbParamPtr(argList, SV_P3, (ArbParam_t*)&P3);
    TecUtilArgListAppendArbParamPtr(argList, SV_P4, (ArbParam_t*)&P4);
    TecUtilArgListAppendArbParamPtr(argList, SV_P5, (ArbParam_t*)&P5);
    TecUtilArgListAppendArbParamPtr(argList, SV_OBJECTSET, (ArbParam_t*)&objectSet);
    TecUtilArgListAppendArbParamPtr(argList, SV_OFFSET1, &offset1);
    TecUtilArgListAppendArbParamPtr(argList, SV_OFFSET2, &offset2);
    TecUtilStateChangeGetInfoX(argList);
    finalOffset1 = offset1;
    finalOffset2 = offset2;
    ... do something with P1, P2, P3, etc ...

Boolean_t TecUtilStateChangeGetMap ( EntIndex_t Map  ) 

Retrieve a reference to the map associated with the previous state change.

Since:
11.0-0-320
Parameters:
Map Reference to the map associated with the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
Map Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetMap(Map)
    INTEGER*4 Map

Python Syntax:

    This function is not supported in Python.

Boolean_t TecUtilStateChangeGetName ( char **  NameRef  ) 

Retrieve a reference to the name associated with the previous state change.

Since:
10.0-3-129
Note:
Unlike many other properties retrieved from Tecplot this name string is not an allocated copy and should not be deallocated.
Parameters:
NameRef Read-only reference to a retrieved name associated with the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
NameRef Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetName(
   &                   Name,
   &                   NameLength)
    CHARACTER*(*)   Name
    INTEGER*4       NameLength

Python Syntax:

    This function is not supported in Python.

Your state change callback was just called with StateChange_AuxDataAdded. Take action if it was "COMMON.TIME" auxiliary data associated with zone 2.

     LgIndex_t   ArbEnumValue;
     EntIndex_t  Zone;
     char       *Name;
     if ((TecUtilStateChangeGetArbEnum(&ArbEnumValue) &&
          ((AuxDataLocation_e)ArbEnumValue == AuxDataLocation_Zone)) &&
         (TecUtilStateChangeGetZone(&Zone) &&
          Zone == 2)                                                 &&
         (TecUtilStateChangeGetName(&Name) &&
          ustrcmp(Name, AuxData_Common_Time) == 0))
        {
           ....take some knowing aux data "COMMON.TIME" was just added
           .... to zone Zone.
        }

Boolean_t TecUtilStateChangeGetPageUniqueID ( UniqueID_t UniqueID  ) 

Retrieve the page UniqueID supplemental information from the previous state change.

Since:
11.3-7-003
Parameters:
UniqueID Retrieved page UniqueID value from the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
UniqueID Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetPageUniqueID(UniqueID)
    INTEGER*4 UniqueID

Python Syntax:

    This function is not supported in Python.

   UniqueID_t UniqueID;
   if (TecUtilStateChangeGetPageUniqueID(&UniqueID))
     {
       ....take some action using UniqueID.
     }

Boolean_t TecUtilStateChangeGetStyleParam ( int  Param,
const char **  StyleParam 
)

Retrieve one of the P1,P2,P3,P4,P5,P6, or P7 style parameters from the previous style state change.

Parameters:
Param The parameter number to retrieve. Must be a number between 1 and 7
StyleParam Style parameter retrieved. DO NOT FREE THIS STRING.
Python Syntax:
    This function is not supported in Python.

Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
StyleParam Pointer must be a valid address and non-NULL.
Your state change callback was just called with StateChange_Style. Take action if the first two style parameters are SV_INTERFACE and SV_USEAPPROXIMATEPLOTS.

     char *P1;
     char *P2;
     if (TecUtilStateChangeGetStyleParam(1,&P1) &&
         TecUtilStateChangeGetStyleParam(2,&P2) &&
         (strcmp(P1,SV_INTERFACE) == 0)             &&
         (strcmp(P2,SV_USEAPPROXIMATEPLOTS) == 0))
       {
           ....take some action.
       }

Boolean_t TecUtilStateChangeGetUniqueID ( UniqueID_t UniqueID  ) 

Retrieve UniqueID supplemental information from the previous state change.

Since:
11.0-5-016
Parameters:
UniqueID Retrieved UniqueID value from the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
UniqueID Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetUniqueID(UniqueID)
    INTEGER*4 UniqueID

Python Syntax:

    This function is not supported in Python.

   UniqueID_t UniqueID;
   if (TecUtilStateChangeGetUniqueID(&UniqueID))
     {
       ....take some action using UniqueID.
     }

Boolean_t TecUtilStateChangeGetVar ( EntIndex_t Var  ) 

Retrieve a reference to the variable associated with the previous state change.

Since:
11.0-0-320
Parameters:
Var Reference to the variable associated with the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
Var Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetVar(Var)
    INTEGER*4 Var

Python Syntax:

    This function is not supported in Python.

Boolean_t TecUtilStateChangeGetVarSet ( Set_pa VarSetRef  ) 

Retrieve a reference to the set of variables associated with the previous state change.

Note:
Unlike many other properties retrieved from Tecplot this set is not an allocated copy and should not be deallocated.
Parameters:
VarSetRef Read-only reference to a retrieved set of variables associated with the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
VarSetRef Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetVarSet(VarSetRefPtr)
    POINTER (VarSetRefPtr, VarSetRef)

Python Syntax:

    This function is not supported in Python.

Your state change callback was just called with StateChange_VarsAltered. Take action using the retrieved set of variables that were altered.

   Set_pa VarsAlteredRef;
   if (TecUtilStateChangeGetVarSet(&VarsAlteredRef))
     {
         ....take some action using VarsAltered.
         .... Do not dealloc VarsAltered when finished.
     }

Boolean_t TecUtilStateChangeGetZone ( EntIndex_t Zone  ) 

Retrieve the number of the zone associated with the previous state change.

Parameters:
Zone Retreived zone number associated with previous state change
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
Zone Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetZone(Zone)
    INTEGER*4 Zone

Python Syntax:

    This function is not supported in Python.

Your state change callback was just called with StateChange_AuxDataAdded. Take action if it was auxiliary data associated with zone 2.

     LgIndex_t  ArbEnumValue;
     EntIndex_t Zone;
     if ((TecUtilStateChangeGetArbEnum(&ArbEnumValue) &&
          ((AuxDataLocation_e)ArbEnumValue == AuxDataLocation_Zone)) &&
         (TecUtilStateChangeGetZone(&Zone) &&
          Zone == 2))
        {
           ....take some knowing aux data was just added
           .... to zone Zone.
        }

Boolean_t TecUtilStateChangeGetZoneSet ( Set_pa ZoneSetRef  ) 

Retrieve a reference to the set of zones associated with the previous state change.

Note:
Unlike many other properties retrieved from Tecplot this set is not an allocated copy and should not be deallocated.
Parameters:
ZoneSetRef Read-only reference to a retreived set of zones associated with the previous state change.
Returns:
Returns TRUE successful, FALSE otherwise.
Precondition:
ZoneSetRef Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeGetZoneSet(ZoneSetRefPtr)
    POINTER (ZoneSetRefPtr, ZoneSetRef)

Python Syntax:

    This function is not supported in Python.

Your state change callback was just called with StateChange_VarsAltered. Take action using the retrieved set of variables that were altered. In addition, if possible, make use of the set of zones that were altered if you can retrieve that information.

   Set_pa VarsAlteredRef;
   if (TecUtilStateChangeGetVarSet(&VarsAlteredRef))
     {
        Set_pa ZonesAlteredRef;
        if (TecUtilStateChangeGetZoneSet(&ZonesAlteredRef))
           {
              ... take action knowing both what zones and
              ... what vars were altered.
           }
         else
           {
              ....take some action using only VarsAltered.
              .... assume all zones were altered.
           }
     }

Boolean_t TecUtilStateChangeRemoveCallback ( void *  AddOnStateChangeCallback  ) 

Remove a previously added callback from Tecplot's list of add-on state change callbacks.

Note:
An add-on may not remove its callback in response to a state change.
Since:
11.0-5-041
Parameters:
AddOnStateChangeCallback Previously registered add-on callback to remove from Tecplot's list of state change callbacks.
Returns:
TRUE if the callback was found in the list of add-on state change callbacks, FALSE otherwise.
Python Syntax:
    This function is not supported in Python.

Boolean_t TecUtilStateChangeRemoveCBX ( ArgList_pa  ArgList  ) 

Remove a previously added callback from Tecplot's list of add-on state change callbacks.

Note:
An add-on may not remove its callback in response to a state change.
Since:
11.2-0-113
Parameters:
ArgList Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions.


Arglist Values

SV_CALLBACKFUNCTION
Type: void *
Arg Function: TecUtilArgListAppendFunction()
Required: Yes
Notes: Previously registered add-on state change callback to remove from Tecplot's list of state change callbacks.

SV_CLIENTDATA
Type: ArbParam_t
Arg Function: TecUtilArgListAppendArbParam()
Default: 0
Required: No
Notes: Client data that was previously registered with the callback. If supplied, Tecplot will only remove the callback that matches both the supplied callback function and client data. This is useful if the same callback was previously registered with different client data. If not supplied Tecplot will remove the first callback that matches the supplied function regardless of the client data registered with the callback.


Returns:
TRUE if the callback was found in the list of add-on state change callbacks, FALSE otherwise.
Precondition:
ArgList Argument list must be valid.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeRemoveCBX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

    This function is not supported in Python.

Boolean_t TecUtilStateChangeSetMode ( StateChangeAddOnCallback_pf  Callback,
StateChangeMode_e  Mode 
)

Set the mode in which state changes are propagated to the specified state change callback.

Parameters:
Callback Function already registered to receive state change callbacks
Mode Mode you want state changes propagated to your state change callback function. Choose either StateChangeMode_v80, StateChangeMode_v100, or StateChangeMode_v113. See the section "Sending State Changes" in the "ADK User's Manual" for a complete description of the differences between these options.
Returns:
Returns TRUE successful (that is, the callback function was registered), FALSE otherwise.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilStateChangeSetMode(
   &                   StateChangeCallback,
   &                   Mode)
    EXTERNAL   StateChangeCallback
    INTEGER*4  Mode

Python Syntax:

    This function is not supported in Python.

Set the mode state change callbacks to the function BananaCallbackFunction to use the v113 mode.


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