Functions | |
Boolean_t | TecUtilStyleSetBase (StyleBase_e StyleBase) |
Set the frame style defaults used by Tecplot when creating new frames. | |
GetValueReturnCode_e | TecUtilStyleGetLowLevelX (ArgList_pa ArgList) |
Low level function used to get most page, frame, and general attribute values in Tecplot. | |
char * | TecUtilStyleGetLastErrorString (void) |
If the last call to TecUtilStyleSetLowLevel or TecUtilStyleSetLowLevelX returns an error, this function may be called to retrieve the error message generated by Tecplot | |
SetValueReturnCode_e | TecUtilStyleSetLowLevelX (ArgList_pa ArgList) |
Low level function used to set most page, frame, and general attribute values in Tecplot. | |
SetValueReturnCode_e | TecUtilStyleSetLowLevel (Widget TextFieldWidget, double DValue, ArbParam_t IValue, ArbParam_t SetOrOffset, AssignOp_e AssignModifier, const char *P1, const char *P2, const char *P3, const char *P4, const char *P5, const char *P6, Boolean_t DoImplicitRecording) |
Low level function used to set most frame and base attribute values in Tecplot. |
char* TecUtilStyleGetLastErrorString | ( | void | ) |
If the last call to TecUtilStyleSetLowLevel or TecUtilStyleSetLowLevelX returns an error, this function may be called to retrieve the error message generated by Tecplot
Results = TecUtil.StyleGetLastErrorString()
Output:
Results[0] ReturnVal string
GetValueReturnCode_e TecUtilStyleGetLowLevelX | ( | ArgList_pa | ArgList | ) |
Low level function used to get most page, frame, and general attribute values in Tecplot.
The parameters to TecUtilStyleGetLowLevelX() mimic the Macro Frame SetValue Commands described in the Tecplot Reference Manual.
ArgList | Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions. Arglist Values SV_UNIQUEID
SV_P1
SV_P2
SV_P3
SV_P4
SV_P5
SV_P6
SV_OFFSET1
SV_OFFSET2
SV_DVALUE
SV_IVALUE
|
GetValueReturnCode_Ok Value was assigned to either the double or ArbParam_t value given. GetValueReturnCode_ResultTypeError Resulting type mismatch with the supplied DValue or IValue. GetValueReturnCode_SyntaxError SV_P# parameters did not follow the macro command syntax. The parameters must mimic the macro command language and only for the branches of the language tree that are available.
INTEGER*4 FUNCTION TecUtilStyleGetLowLevelX(ArgListPtr) POINTER (ArgListPtr, ArgList)
Python Syntax:
This function is not supported in Python.
Make some miscellaneous queries:
ArgList_pa ArgList; ArbParam_t IValue; double DValue; GetValueReturnCode_e GVRC; TecUtilLockStart(AddOnID); ArgList = TecUtilArgListAlloc(); // get mesh color for zone 2 ...assuming Tecplot's plot type is Cartesian TecUtilArgListClear(ArgList); TecUtilArgListAppendInt(ArgList, SV_OFFSET1, 2); TecUtilArgListAppendString(ArgList, SV_P1, SV_FIELDMAP); TecUtilArgListAppendString(ArgList, SV_P2, SV_MESH); TecUtilArgListAppendString(ArgList, SV_P3, SV_COLOR); TecUtilArgListAppendArbParamPtr(ArgList, SV_IVALUE, (ArbParam_t*)&IValue); GVRC = TecUtilStyleGetLowLevelX(ArgList); if (GVRC == GetValueReturnCode_Ok) { ColorIndex_t MeshColor = (ColorIndex_t)IValue; printf("Zone 2's mesh color is %d\n", MeshColor); } // get the line thickness of zone 3... same assumptions as above TecUtilArgListClear(ArgList); TecUtilArgListAppendInt(ArgList, SV_OFFSET1, 3); TecUtilArgListAppendString(ArgList, SV_P1, SV_FIELDMAP); TecUtilArgListAppendString(ArgList, SV_P2, SV_MESH); TecUtilArgListAppendString(ArgList, SV_P3, SV_LINETHICKNESS); TecUtilArgListAppendDoublePtr(ArgList, SV_DVALUE, &DValue); GVRC = TecUtilStyleGetLowLevelX(ArgList); if (GVRC == GetValueReturnCode_Ok) { double MeshLineThickness = DValue; printf("Zone 3's mesh line thickness is %lg\n", MeshLineThickenss); } // get the positive prefix number for contour group 1's contour legend TecUtilArgListClear(ArgList); TecUtilArgListAppendInt(ArgList, SV_OFFSET1, 1); TecUtilArgListAppendString(ArgList, SV_P1, SV_GLOBALCONTOUR); TecUtilArgListAppendString(ArgList, SV_P2, SV_LEGEND); TecUtilArgListAppendString(ArgList, SV_P3, SV_NUMFORMAT); TecUtilArgListAppendString(ArgList, SV_P3, SV_POSITIVEPREFIX); TecUtilArgListAppendArbParamPtr(ArgList, SV_IVALUE, (ArbParam_t*)&IValue); if (GVRC == GetValueReturnCode_Ok) { char *PositivePrefixStr = (char *)IValue; if (PositivePrefixStr != NULL) { printf("Positive prefix number format for " "contour group 1's contour legend is:%s\n", PositivePrefixStr); TecUtilStringDealloc(&PositivePrefixStr); } else printf("Positive prefix number format for " "contour group 1's contour legend " "was not specified.\n"); } TecUtilArgListDealloc(&ArgList); TecUtilLockFinish(AddOnID);
Boolean_t TecUtilStyleSetBase | ( | StyleBase_e | StyleBase | ) |
Set the frame style defaults used by Tecplot when creating new frames.
During normal operation, Tecplot bases the style of a new frame on the factory defaults plus any changes assigned in the Tecplot configuration file. Layout files and stylesheet files, however, rely on Tecplot basing new frames only on the factory defaults. This command is typically not used by the casual user.
StyleBase | Style base used by Tecplot for all future frames. This may be set to StyleBase_Factory or StyleBase_Config |
INTEGER*4 FUNCTION TecUtilStyleSetBase(StyleBase) INTEGER*4 StyleBase
Python Syntax:
Results = TecUtil.StyleSetBase(StyleBase) Input: StyleBase StyleBase_e (defined in TecVals.py) Output: Results[0] ReturnVal boolean
Instruct Tecplot to create all future frames based upon the factory defaults, ignoring any modifications specified in the user's tecplot.cfg file.
SetValueReturnCode_e TecUtilStyleSetLowLevel | ( | Widget | TextFieldWidget, | |
double | DValue, | |||
ArbParam_t | IValue, | |||
ArbParam_t | SetOrOffset, | |||
AssignOp_e | AssignModifier, | |||
const char * | P1, | |||
const char * | P2, | |||
const char * | P3, | |||
const char * | P4, | |||
const char * | P5, | |||
const char * | P6, | |||
Boolean_t | DoImplicitRecording | |||
) |
Low level function used to set most frame and base attribute values in Tecplot.
Use this function only if you cannot find an appropriate convenience function that will do the job. As of Tecplot v. 10, this function has ben superseded by TecUtilStyleSetLowLevelX(). The parameters to TecUtilStyleSetLowLevel() mimic the Macro Frame SetValue Commands and Macro General SetValue Commands described in the Tecplot Reference Manual.
TextFieldWidget | Under Windows, this parameter is not allowed and must be set to NULL.Under Motif, if the value is coming from a text field and you supply the text field's name to TecUtilStyleSetLowLevel(), the following will happen: It will parse the value in the text field for you.Tecplot will repair the text field if the input value is invalid | |
DValue | If the attribute to be assigned requires a floating point value and TextFieldWidget is set to NULL then DValue is used as the value to assign | |
IValue | If the attribute to be assigned requires an integer, an enumerated value, or is a handle to a string, and, TextFieldWidget is set to NULL then IValue is used as the value to assign | |
SetOrOffset | Some attributes require further definition on what to assign the incoming value to. When assigning to SV_FIELDMAP attributes (that is, mesh color, scatter symbol size, and so forth) or to SV_LINEMAP attributes (that is, bar chart color, error bar type, and so forth). SetOrOffset is a Set_pa type.For field attributes it represents the set of zones to operate on and for Line-map attributes it represents the set of Line-maps to operate on. In a few other cases, SetOrOffset represents the offset into a list of items. For example, when assigning attributes for the third X-axis in an XY-plot, SetOrOffset is set to 3 | |
AssignModifier | The possible values are: AssignOp_Equals: Assign the value directly to the attribute; AssignOp_PlusEquals: Add the value to the current attribute value; AssignOp_MinusEquals: Subtract the value from the current attribute value; AssignOp_TimesEquals: Multiply the value with the current attribute value; AssignOp_DivideEquals: Divide the current attribute value by the supplied value. | |
P1 | The first parameter used to define the attribute to assign to. Attributes in Tecplot are defined hierarchically. These parameters follow the same order as you would use when constructing a macro command. These parameters are actually strings but you can use the supplied SV_XXXXX constants from the SV.h include file. Using the SV_ constants will help prevent misspellings and other errors | |
P2 | The second parameter used to define the attribute to assign to. See P1. | |
P3 | The third parameter used to define the attribute to assign to. See P1. | |
P4 | The fourth parameter used to define the attribute to assign to. See P1. | |
P5 | The fifth parameter used to define the attribute to assign to. See P1. | |
P6 | The sixth parameter used to define the attribute to assign to. See P1. | |
DoImplicitRecording | This argument is used to control implicit recording of the set value command when issued by a parent application. If the set value command is issued by an add-on the value of this argument is ignored and implicit recording is turned off. Only in rare situations would a parent application elect to turn off implicit recording. |
P2 Pointer must be a valid address or NULL.
P3 Pointer must be a valid address or NULL.
P4 Pointer must be a valid address or NULL.
P5 Pointer must be a valid address or NULL.
P6 Pointer must be a valid address or NULL.
DoImplicitRecording Value must be TRUE or FALSE.
INTEGER*4 FUNCTION TecUtilStyleSetLowLevel( & TextFieldWidgetPtr, & DValue, & IValuePtr, & SetOrOffsetPtr, & AssignModifier, & P1, & P2, & P3, & P4, & P5, & P6, & DoImplicitRecording) POINTER (TextFieldWidgetPtr, TextFieldWidget) REAL*8 DValue POINTER (IValuePtr, IValue) POINTER (SetOrOffsetPtr, SetOrOffset) INTEGER*4 AssignModifier CHARACTER*(*) P1 CHARACTER*(*) P2 CHARACTER*(*) P3 CHARACTER*(*) P4 CHARACTER*(*) P5 CHARACTER*(*) P6 INTEGER*4 DoImplicitRecording
Python Syntax:
This function is not supported in Python.
Call TecUtilStyleSetLowLevel() to assign the color red to the text on the second Y-axis in an XY-plot.
From the reference manual (or by recording a macro) we see that the macro command to accomplish this feat is:
$!XYAXIS YDETAIL 2 { TICKLABEL { COLOR = BLUE } }
The corresponding call to TecUtilStyleSetLowLevel() is then:
S = TecUtilStyleSetLowLevel((Widget)NULL, 0.0, // Not Used (ArbParam_t)Blue_C, (ArbParam_t)2, // second Y-Axis AssignOp_Equals, SV_XYLINEAXIS, SV_YDETAIL, SV_TICKLABEL, SV_COLOR, (char *)NULL, (char *)NULL, TRUE);
From the Tecplot Reference Manual (or by recording a macro) we see that the macro command to accomplish this feat is:
$!FIELD [1-3,7,9] POINTS { IJKSKIP { I = 2 } }
The corresponding call to TecUtilStyleSetLowLevel() is then:
Set_pa ZoneSet; SetValueReturnCode_e SVRC; ZoneSet = TecUtilSetAlloc(FALSE); TecUtilSetAddMember(ZoneSet,1,FALSE); TecUtilSetAddMember(ZoneSet,2,FALSE); TecUtilSetAddMember(ZoneSet,3,FALSE); TecUtilSetAddMember(ZoneSet,7,FALSE); TecUtilSetAddMember(ZoneSet,9,FALSE);
For the following
$!Field [zoneset] Points {IJKSkip {I = (LgIndex_t)}}
use the corresponding TecUtilStyleSetLowLevel() call:
SVRC = TecUtilStyleSetLowLevel((Widget)NULL, 0.0, // Not used (ArbParam_t)2, // Vector Skip (ArbParam_t)ZoneSet, AssignOp_Equals, SV_FIELDMAP, SV_POINTS, SV_IJKSKIP, SV_I, (char *)NULL, (char *)NULL, TRUE);
The above task could also be accomplished by using the convenience function TecUtilZoneSetVectorIJKSkip() as follows:
S = TecUtilZoneSetVectorIJKSkip(SV_I, ZoneSet, 2);
Call TecUtilStyleSetLowLevel() to assign the I-Skip to 2 for vectors and scatter symbols in zones 1-3, 7, and 9.
From the Tecplot Reference Manual (or by recording a macro) we see that the macro command to accomplish this feat is:
$!FIELD [1-3,7,9] POINTS { IJKSKIP { I = 2 } }
The corresponding call to TecUtilStyleSetLowLevel() is then:
Set_pa ZoneSet; SetValueReturnCode_e SVRC; ZoneSet = TecUtilSetAlloc(FALSE); TecUtilSetAddMember(ZoneSet,1,FALSE); TecUtilSetAddMember(ZoneSet,2,FALSE); TecUtilSetAddMember(ZoneSet,3,FALSE); TecUtilSetAddMember(ZoneSet,7,FALSE); TecUtilSetAddMember(ZoneSet,9,FALSE);
For the following
$!Field [zoneset] Points {IJKSkip {I = (LgIndex_t)}}
use the corresponding TecUtilStyleSetLowLevel() call:
SVRC = TecUtilStyleSetLowLevel((Widget)NULL, 0.0, // Not used (ArbParam_t)2, // Vector Skip (ArbParam_t)ZoneSet, AssignOp_Equals, SV_FIELDMAP, SV_POINTS, SV_IJKSKIP, SV_I, (char *)NULL, (char *)NULL, TRUE);
The above task could also be accomplished by using the convenience function TecUtilZoneSetVectorIJKSkip() as follows:
S = TecUtilZoneSetVectorIJKSkip(SV_I, ZoneSet, 2);
FORTRAN EXAMPLE: Set Surfaces to plot to be I-Planes for zone 2.
Call TecUtilSetAlloc(IShowErr,ZoneListPtr) IErr = TecUtilSetAddMember(ZoneListPtr,2,IShowErr) C C ... Must use a pointer to ship IValue because call stack expects C ... argument the size of a pointer. C IValuePtr = SurfacesToPlot_IPlanes ISVRC = TecUtilStyleSetLowLevel(LocalNullPtr, & 0.0D0, & IValuePtr, & ZoneListPtr, & AssignOp_Equals, & 'FIELD'//char(0), & 'SURFACES'//char(0), & 'SURFACESTOPLOT'//char(0), & char(0), & char(0), & char(0), & TRUE) Call TecUtilSetDealloc(ZoneListPtr)
SetValueReturnCode_e TecUtilStyleSetLowLevelX | ( | ArgList_pa | ArgList | ) |
Low level function used to set most page, frame, and general attribute values in Tecplot.
Use this function only if you cannot find an appropriate convenience function that will do the job. The parameters to TecUtilStyleSetLowLevelX() mimic the Macro Frame SetValue Commands and Macro General SetValue Commands described in the Tecplot Reference Manual.
ArgList | Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions. Arglist Values SV_UNIQUEID
SV_P1
SV_P2
SV_P3
SV_P4
SV_P5
SV_P6
SV_DOIMPLICITRECORDING
SV_OBJECTSET
SV_OFFSET1
SV_OFFSET2
SV_ASSIGNMODIFIER
SV_DVALUE
SV_IVALUE
SV_STRVALUE
|
INTEGER*4 FUNCTION TecUtilStyleSetLowLevelX(ArgListPtr) POINTER (ArgListPtr, ArgList)
Python Syntax:
Results = TecUtil.StyleSetLowLevelX(ArgList) Input: ArgList dictionary Output: Results[0] ReturnVal SetValueReturnCode_e (defined in TecVals.py)
Set the contour variable of the second contour group to variable number 4:
ArgList_pa ArgList; TecUtilLockStart(AddOnID); ArgList = TecUtilArgListAlloc(); if (ArgList != NULL) { SetValueReturnCode_e SVRC; TecUtilArgListClear(ArgList); TecUtilArgListAppendString(ArgList, SV_P1, SV_GLOBALCONTOUR); TecUtilArgListAppendString(ArgList, SV_P2, SV_VAR) TecUtilArgListAppendInt(ArgList, SV_OFFSET1, 2); // ...contour group TecUtilArgListAppendArbParam(ArgList, SV_IVALUE, 4); // ...variable SVRC = TecUtilStyleSetLowLevelX(ArgList); // NOTE: A slightly more convenient way to do this is to use // the TecUtilContourSetVariableX() convenience function. TecUtilArgListClear(ArgList); TecUtilArgListAppendInt(ArgList, SV_CONTOURGROUP, 2); TecUtilArgListAppendInt(ArgList, SV_VAR, 4); SVRC = TecUtilContourSetVariableX(ArgList); TecUtilArgListDealloc(&ArgList); } TecUtilLockFinish(AddOnID);
FORTRAN EXAMPLE:
This will set the value blanking condition cutoff value to be V3 >= 0.6
Using the "X" function we have the following arglist entries are available:
Name Type ------------------------------- 'P1' string 'P2' string 'P3' string 'P4' string 'P5' string 'P6' string 'OBJECTSET' Set_pa 'OFFSET1' LgIndex_t 'OFFSET2' LgIndex_t 'ASSIGNMODIFIER' AssignOp_e 'DVALUE' double 'IVALUE' ArbParam_t
C C ... Set the value blanking variable to 3 C Call TecUtilArgListAlloc(ArgListPtr) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P1'//char(0), & 'BLANKING'//char(0)) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P2'//char(0), & 'VALUE'//char(0)) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P3'//char(0), & 'CONSTRAINT'//char(0)) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P4'//char(0), & 'VARA'//char(0)) IErr = TecUtilArgListAppendInt( ArgListPtr, & 'OFFSET1'//char(0), & 1) IValuePtr = 3 IErr = TecUtilArgListAppendArbParam( ArgListPtr, & 'IVALUE'//char(0), & IValuePtr) write(*,*) 'setting constraint vara' IRet = TecUtilStyleSetLowLevelX(ArgListPtr) Call TecUtilArgListDealloc(ArgListPtr) C C ... Set cutoff value. C Call TecUtilArgListAlloc(ArgListPtr) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P1'//char(0), & 'BLANKING'//char(0)) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P2'//char(0), & 'VALUE'//char(0)) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P3'//char(0), & 'CONSTRAINT'//char(0)) IErr = TecUtilArgListAppendString(ArgListPtr, & 'P4'//char(0), & 'VALUECUTOFF'//char(0)) IErr = TecUtilArgListAppendInt( ArgListPtr, & 'OFFSET1'//char(0), & 1) IErr = TecUtilArgListAppendDouble( ArgListPtr, & 'DVALUE'//char(0), & 0.6D0) write(*,*) 'setting constraint value cut-off' IRet = TecUtilStyleSetLowLevelX(ArgListPtr) Call TecUtilArgListDealloc(ArgListPtr)