Navigation:  How do I ...? > Startup Options >

How do I specify options on the DPlot command line?

Print this Topic Previous pageReturn to chapter overviewNext page

To modify how DPlot starts on a one-time basis, you can add switches to the Windows Run command (Start menu). If you plan to use a modified startup method frequently, you can create a shortcut on the Windows desktop.

To add switches to the Windows Run command:

1)On the Windows Start menu, click Run.
2)Enter the path to DPlot, such as C:\Program Files\DPlot\DPlot.exe, or click Browse to locate it.
3)At the end of the path, type a space, and then type a startup switch. (see below)

To create a desktop shortcut:

1)Right-click the Windows desktop, point to New, and then click Shortcut.
2)In the Type the location of the item box, enter the path to DPlot, such as C:\Program Files\DPlot\DPlot.exe, or click Browse to locate it.
3)At the end of the path, type a space, and then type a startup switch.

Startup switches

Switch

Description

/ffiletype filename

Opens and displays the file filename of type filetype (see below)

/pfiletype filename

Prints filename using the current default printer and printer options. Filetype is described below.

/m macroname

Runs the macro named macroname (name as it appears on the Macro dialog)

/s preferences file

or

/sp prefences file

Reads preferences from "preferences file", which was previously saved using the Save Preferences command on the File menu. If the form /sp is used, this preferences file will be used on all new documents during the current DPlot session. %APPDATA%\DPlot\Preferences\default.set will in this case be ignored. Without the p suffix, the preferences file will only be used on documents opened on the command line.

/d folder

Specify the default folder for opening and saving files.

This switch is primarily useful for running macros from the command line when you do not want to manually edit the macro to include a Directory command. For example, if you have a macro named SavePNG that contains:

ForFilesIn("*.grf")

FileSaveAs("Portable Network Graphics",".png")

FileClose()

NextFile

then the command line:

[d:\path\]dplot.exe /d "c:\My Data Folder" /m SavePNG

will open all files with extension .grf in the folder c:\My Data Folder and save PNG images of those graphs to c:\My Data Folder.

/nonag

Prevents the introductory dialog from being displayed (tip of the day and/or expiration days for the trial version). This might be useful if you are the author of an application that communicates with DPlot via dynamic data exchange, since those dialogs interfere with DDE. (DPLOTLIB.DLL automatically applies /nonag when starting DPlot)

/show state

Overrides the default show state of the DPlot window. state=0 to hide DPlot, 2 to start minimized, 3 to start maximized, or 9 to start "restored" (not maximized). For programmers, these are the same values as the nCmdShow argument to the ShowWindow function.

/xcyc,c,c,c...

Specifies how columns in a multiple-column ASCII text file (type 4 below) are interpreted. Use 0 following the x if X values should be generated by DPlot, starting at 0 and incremented by 1 for each data point. Y column indices should be separated by commas. No spaces are allowed. For example, /x2y3,4,5 will use the 2nd column in the file for the X values and the 3rd, 4th, and 5th columns for Y in 3 curves. This setting only affects command line file operations; it is not persistent. This setting should precede any command line filenames.

/xcyczc

Similar to above, but applied to 3D surface plots (type 11 below).

filename

Same as the /f switch above, but forces DPlot to attempt to determine the filetype. See below.

NOTE: As with any other Windows program, if a filename and/or path contains spaces then it should be surrounded by double quotation marks, as in:

dplot.exe "c:\my documents\my data\datafile.csv"

File type codes

1DPlot file
2ASCII file, one data set with arbitrarily spaced points.
3ASCII file, one data set with evenly spaced points.
4ASCII file, multiple Y values for each X.
5Unformatted single-precision (4 byte floating point) data.
6Binary file produced by Pacific Data Model 9820 recorders, DNA/Bendix format.
7Binary file produced by Pacific Data recorders, OLD format.
8Binary file produced by Pacific Data recorders, NEW format.
9Nicolet Time Domain files (binary) created with the Nicolet System 400 Digital Oscilloscope.
10Hardened Data Acquisition System (HDAS) files.
11Random 3D values (contour plot).
131D statistics data.
267Random 3D values. Identical to 11, but interpreted as a 3D scatter plot rather than a surface plot.

File types are described in more detail in the description of the Open command command.

If /Ffiletype is omitted, DPlot attempts to determine the file type with the following assumptions:

If

DPlot assumes the file is:

The first line of the file contains the DPlot file header (DPlot vxx)

DPlot file (type 1)

Plugin_typecheck for any installed file import plugin returns true.

type 12 (plugin). plugin_readfile in the corresponding plugin DLL is used to read the file.

ASCII file with one or more columns of data

type 4

a)The file size is a multiple of 1024 bytes
b)The file size is at least 2048 bytes)
The first four bytes of the file has the number of data points, and the file size is equal to 1024*(int((NumPoints-1)/128)+2)

type 5

If the file does not match any of these formats, DPlot attempts to identify it as one of the five supported data recorder binary file formats using a combination of expected file size and file header information. Note that if the file type is not specified, DPlot will always identify type 2 and 3 files (see below) as type 4 files. Type 2 files are a subset of type 4, so the data will be interpreted correctly. However, type 3 files that are identified as type 4 will lack the spacing between points (X will start at 0 and be incremented by 1 for each data point).

____________________________

See also:

DPlot File

 

 


Page url: https://www.dplot.com/help/index.htm?how_commandline.htm