Macro commands may be used either in macros or by sending the commands to DPlot via dynamic data exchange (DDE). Some commands are valid only in macros (noted by Macros Only). Commands sent to DPlot via DDE must be enclosed by square brackets [ ]. Macro commands should not include the brackets.
Command parameters shown in the descriptions below are placeholders for the actual values. Command parameters are either numeric values, equations that evaluate to numbers, or character strings. Character string parameters are always bound by double quotation marks. Equations must be preceded by an equals sign (=).
The pipe symbol (|) in the command syntax indicates that a parameter is optional, and should not be included in your macro unless otherwise noted.
All indices into arrays are 1-based, e.g. Curve1=1 refers to the first curve in a plot.
A 0x prefix for numbers in the descriptions below indicates hexadecimal notation; e.g. 0x0010 = 16.
JR/Viewer indicates that the command is supported by DPlot Jr or DPlot Viewer.
JR/Viewer indicates that the command is NOT supported by DPlot Jr or DPlot Viewer.
[FilePrint()] or [FilePrint(0)]
Prints the document using the current default printer settings.
Displays the Print dialog box, from which the user may change printer settings and print the currently active document and optionally print any or all of the other open documents on the same page.
Prints the document using the default driver and port settings for the printer, where printer is the printer description exactly as it appears in the Control Panel Printers applet and/or the Print dialog in DPlot. Printer must be installed on this system. It is not restricted to physical printers; it may be a virtual printer like Acrobat Distiller or Adobe PDF, for example. If the optional filename parameter is included and print output is to a file (rather than an actual printer), then the output will be saved to this name. If filename is omitted and output is to a file then generally the plot title with the appropriate extension (e.g. .PDF, .EPS, .PRN) will be used and the file will be saved to the user's My Documents folder. (In general, though, this decision is ultimately up to the selected printer driver if you do not specify a filename.)
The filename argument may include the shortcuts |DPLOTDRIVE|, |DPLOTPATH|, or |DPLOTDOCS| to set the destination drive or full path, respectively, to where DPlot is installed or, for |DPLOTDOCS|, to My Documents\DPlot. This is most often useful when DPlot is installed to a removable drive. All forms must be uppercase and surrounded by the pipe symbol (|) or will be ignored. Please note that the |DPLOTPATH| destination folder may not be acceptable to non-admin accounts on Windows XP and all accounts on Windows Vista and newer versions, depending on where DPlot is installed.
Please note: All PDF printer drivers tested with this command work as expected if no filename is specified: the user is prompted for a filename and gets the expected PDF format. If a filename is specified, this is handled by various drivers in different ways, most of them unexpected. Without the workarounds inserted in DPlot and described below, some drivers will produce a PostScript file rather than PDF format (notably the Adobe PDF driver), while others insist on prompting for a filename whether one is specified or not. One exception is Win2PDF, from Dane Prairie Systems, which works as expected when a filename is specified: The Save As dialog is not displayed, and the output is PDF.
DPlot includes code to work around this behavior for print drivers Adobe PDF, Pdf995 from Software995, PDFcamp Printer from veryPDF, and docuPrinter from Neevia Technology. For programmers interested in this sort of thing:
Adobe PDF: Modify registry key HKEY_CURRENT_USER\Software\Adobe\Acrobat Distiller\PrinterJobControl to include:
This registry entry is automatically deleted by the Adobe print driver once StartDoc is called.
Pdf995: Set lpszDocName member of DOCINFO structure to <pdf995:filename>
PDFcamp: Modify registry key HKEY_CURRENT_USER\Software\verypdf\pdfcamp to include the following values:
These values are restored to their previous settings (or deleted if they did not previously exist) once the file is created. For more information on PDFcamp registry settings see How do I make an output file without bringing up the "Save As" dialog? on the veryPDF web site.
docuPrinter: Modify registry key HKEY_CURRENT_USER\Software\NEEVIA\Neevia docuprinter to include the following values:
These values are restored to their previous settings (or deleted if they did not previously exist) once the file is created.