Functions | |
| Boolean_t | TecUtilPrint (void) |
| Print the current layout to a printer or send the print instructions to a file. | |
| SetValueReturnCode_e | TecUtilPrintSetup (const char *Attribute, const char *SubAttribute, double DValue, ArbParam_t IValue) |
| Setup the attributes for printing. | |
| Boolean_t TecUtilPrint | ( | void | ) |
Print the current layout to a printer or send the print instructions to a file.
Use the TecUtilPrintSetup() function to configure printing.
INTEGER*4 FUNCTION TecUtilPrint()
Python Syntax:
Results = TecUtil.Print()
Output:
Results[0] ReturnVal boolean
Setup to print to a grayscale PostScript file called "print.ps" with black flooding appearing as a light gray and then do the printing:
TecUtilPrintSetup("PALETTE", NULL, 0.0, (ArbParam_t)Palette_Monochrome); TecUtilPrintSetup("DRIVER", NULL, 0.0, (ArbParam_t)PD_PS); TecUtilPrintSetup("PRINTFNAME", NULL, 0.0, (ArbParam_t)"print.ps"); TecUtilPrintSetup("MONOFLOODMAP", "BLACKSHADE", 90.0, (ArbParam_t)0); TecUtilPrint();
| SetValueReturnCode_e TecUtilPrintSetup | ( | const char * | Attribute, | |
| const char * | SubAttribute, | |||
| double | DValue, | |||
| ArbParam_t | IValue | |||
| ) |
Setup the attributes for printing.
Use TecUtilPrint() to do the actual printing. See the $!PRINTSETUP macro command in the Tecplot Reference Manual for more details on available options.
| Attribute | First parameter used in the $!PRINTSETUP macro command. See the Tecplot Reference Manual for the possible combinations of Attribute and SubAttribute. The following table shows all possible values for attribute and the corresponding type: |
Attribute I or D Value Type
-----------------------------------------------------------------
SV_PRINTFNAME IValue (char *)
SV_PRECISION IValue (SmInteger_t)
SV_SENDPRINTTOFILE IValue (Boolean_t)
SV_NUMHARDCOPYCOPIES IValue (SmInteger_t)
SV_MAKEROUGHDRAFT IValue (Boolean_t)
SV_LARGEPAPEROK IValue (Boolean_t)
SV_DRIVER IValue (PrinterDriver_e)
SV_PALETTE IValue (Palette_e)
SV_PENSPEED IValue (SmInteger_t)
SV_PLOTTERUNITSPERINCH DValue (double)
SV_WINPRINTERSMAPCOLORTOMONO IValue (Boolean_t)
SV_SPOOLER ------ Base on SubAttribute
SV_JOBCONTROL ------ Base on SubAttribute
SV_NUMLIGHTSOURCESHADES IValue (SmInteger_t)
SV_FORCEEXTRA3DSORTING IValue (Boolean_t)
SV_PRINTRENDERTYPE IValeu (PrintRenderType_e)
SV_IMAGERESOLUTION IValue (LgIndex_t)
| SubAttribute | Second Parameter in the $!PRINTSETUP macro command. See $!PRINTSETUP in the Tecplot Reference Manual for more information. Only used with an Attribute of SV_PLOTTERPENMAP, SV_MONOFLOODMAP, SV_MONOLINEANDTEXTMAP, SV_SPOOLER, or SV_JOBCONTROL. If SubAttribute is not used, pass NULL. The following table shows values for SubAttribute: |
SV_HPGL2MONOSPOOLCMD
SV_HPGL2COLORSPOOLCMD
SV_HPGLSPOOLCMD
SV_PSMONOSPOOLCMD
SV_PSCOLORSPOOLCMD
SV_LGSPOOLCMD
If Attribute is SV_JOBCONTROL, the sent value is ALWAYS a string (thus assigned to IValue) and SubAttribute can be one of:
SV_HPGLMOPUPSTR
SV_HPGL2MOPUPSTR
SV_POSTMOPUPSTR
SV_LGMOPUPSTR
SV_HPGLSETUPSTR
SV_HPGL2SETUPSTR
SV_POSTSETUPSTR
SV_LGSETUPSTR
| DValue | If the Attribute/SubAttribute requires a double or float value, pass it here. Otherwise, use 0.0. | |
| IValue | If the Attribute/SubAttribute requires a value other than a double or float value (that is, an integer, enumerated type, boolean value, or a string), pass it here. Otherwise, use zero. Always typecast the IValue parameter to (ArbParam_t).The possible values for an Attribute of SV_DRIVER are PD_HPGL, PD_HPGL2, PD_PS, PD_LASERG, PD_EPS, and PD_WINDOWS.The possible values for an Attribute of SV_PALETTE are Palette_Monochrome, Palette_PenPlotter, and Palette_Color. |
INTEGER*4 FUNCTION TecUtilPrintSetup( & Attribute, & SubAttribute, & DValue, & IValuePtr) CHARACTER*(*) Attribute CHARACTER*(*) SubAttribute REAL*8 DValue POINTER (IValuePtr, IValue)
Python Syntax:
Results = TecUtil.PrintSetup(Attribute, SubAttribute, DValue, IValue)
Input:
Attribute string
SubAttribute string
DValue double
IValue (depends on attribute)
Output:
Results[0] ReturnVal SetValueReturnCode_e (defined in TecVals.py)
Change the type of print output to be postscript:
SetValueReturnCode_e SVRC; SVRC = TecUtilPrintSetup(SV_DRIVER, NULL, 0.0, // Not used (ArbParam_t)PD_PS);
Change the name of the output file for print commands to be "myprint.ps"
SetValueReturnCode_e SVRC; SVRC = TecUtilPrintSetup(SV_PRINTFNAME, NULL, 0.0, // Not used (ArbParam_t)"myprint.ps");
Set the print spooler command for color output to be "lpr -hpcolor \@"
SetValueReturnCode_e SVRC; SVRC = TecUtilPrintSetup(SV_SPOOLER, SV_PSCOLORSPOOLCMD, 0.0, // Not used (ArbParam_t)"lpr -hpcolor @");
1.5.5