Command Line Options - CLI
PrestoPlot can be controlled from a command line or from within a batch file or shell script.
The syntax of the command line is as follows:
prestoplot -option argument [-option argument] ...
Note
The argument must be surrounded by " " if it contains spaces !
e.g. -renamedata "VBAT VBATTERIE" -calc "INTRA(°)=ARC * 3.1415926 * 2"
Command Line Option Pairs
PrestoPlot accepts the following command line option pairs:
-adddatasets
Add the arguments as data elements to the last opened graph. Example:
-adddatasets "IBAT DEFICIT"
-addmarker
Add a marker to the last opened graph.
Arguments:
- Dataset: The name of the dataset to mark (not optional).
- type=: The type of the marker, one of:
horizontal,vertical,text,point,2point. - value=: The indication of the marker position (not for text); either a value for horizontal markers or a date for vertical and point markers. Point markers will point to the closest value. Use twice for a 2point marker.
- color=: The color of line and text elements. Can be used multiple times for multi-element markers (line, label).
- label=: The text to display on the marker. Can contain special sequences for markers. Use
\nto add multiple lines of text. - labelorient=: The orientation of the marker text (only for vertical markers), one of:
horizontal,vertical. - labelfont=: The font to use for the label (can add bold,italic,underline,overstrike).
- lock=: The position to lock the label to. One of
leftorrightfor horizontal markers,toporbottomfor vertical markers andtopleft,top,topright,left,right,bottomleft,bottomandbottomrightfor the text, point and 2point markers. All markers can be locked to thegraphand can no longer be moved. - index=: The index of the data to point to (only for point or 2point markers); first datapoint is 0, second is 1, etc. Can be used twice for a 2point marker.
- xlabelposition=: The X position of the marker text (only for horizontal, text, point and 2point), Either a dataset x value or a percentage graph position where 0% is on the left and 100% on the right.
- ylabelposition=: The Y position of the marker text (only for vertical, text, point and 2point), Either a dataset y value or a percentage graph position where 0% is on the bottom and 100% on the top.
Note: If label or value contain spaces, enclose in
{}.
Examples:
-addmarker "IBAT type=hor value=2.5 label={Name: %E\nValue: %VY1} lock=right"
-addmarker "VBAT type=ver value={2003/05/28 18:31:01.078} label={Name: %E\nValue: %VX1} color=red color=green ylabelposition=70%"
-addmarker "DEFICIT type=2p index=50 index=100 label={Name: %E\n(%VX1,%VY1)\n(%VX2,%VY2)\n(%SLO)} labelfont={tahoma 20 bold} color=red color=green color=blue xlabelposition=25% lock=top"
-adjustdate
Adjust date values for a set of datasets, or create a new set (suffix=_newname) using the adjusted dates).
Arguments:
- Dataset: The name of the dataset to change.
- group=: If set to
'ALL', all associated datasets from the same file will be adjusted using the same date. Any other value will change only the named dataset. - suffix=: Add a suffix to create new datasets; if not present, the datasets will be adjusted in place.
- from=: The base date in the dataset for adjustment. If not specified, the first date in the dataset is used.
- to=: The date to which the base date will be adjusted.
Example:
-adjustdate "FLIGHT1 from=0 to=ISO8601:2003/05/28 19:00:23.917 suffix=_date group=all"
0 becomes the calendar date 2003/05/28 19:00:23.917.
-arrange
Arrange windows.
Arguments: Action:Mode
Arguments:
- Action: The action to take on the windows.
tile: Rearrange windows with equal size in rows and columns as a grid.horizontally: Rearrange windows with equal size from top to bottom.vertically: Rearrange windows with equal size from left to right.cascade: Rearrange windows overlapping from the top left corner so that all window titles are visible.maximise: Make windows as large as possible.minimize: Make all windows the size of a small part of the window title bar.
- Mode: One of
'all'for all open windows or'graph'for only the graph windows (default:graph).
Note: If Mode is not present then the mode defaults to graph.
Examples:
-arrange tile:graphs
-arrange tile
-calc
Pass calculation expression to calculator.
Format: "NAME(UNITS)=EXPRESSION"
Arguments: The argument is the calculation expression which will be passed to the calculator.
It takes the form "NAME(UNITS)=EXPRESSION" where:
- NAME: The name of the new data to be created.
- UNITS: The units to be used for the new data.
- EXPRESSION: The calculation to execute.
Examples:
-calc "VBATDEF(V)=UsingX(VBAT,DEFICIT)"
-calc "not(none)=!RELAY"
-calc "activation(none)=((!RELAY1)||(!RELAY2))&&((!RELAY3)||(!RELAY4))"
-commandfile
Read a set of command line options from the named file (one per line).
See also PCF files.
Note: The command file can also contain comments by preceding the line with the '#' character.
Example:
-commandfile PowerMgmt.pcf
PowerMgmt.pcf (Lines starting with # are comments. ):
# Load in a set of data from the POM packet
-load "D:/USERS/Presto/PrestoDecom/Resultats/POM_2003_06_16_10_12_59_Decom.tsv"
# Draw a graph from the loaded data
-loadmodel "D:/USERS/Presto/PrestoPlot/Saved/Pom.pmd"
# Save the graph as a gif image file
-savegif "D:/USERS/Presto/PrestoPlot/Saved/Pom.gif"
# Delete the graph
-closegraph LAST
# Delete the loaded data
-deletedata "IBAT VBAT"
$env(VariableName) variable.
-closegraph
Close the last graph or all graphs.
Argument: 'LAST' or 'ALL'
Example:
-closegraph LAST
-configureelement
Configure an element on the last opened graph. Arguments:
- Dataset: The name of the dataset to change.
- label=: Label to display in the legend.
- symbol=: The symbol for the element (
square,circle,diamond,plus,cross,splus,scross,triangle,arrow, ornone). - symbolfill=: The color for the symbol interior.
- symboloutline=: The color for the symbol outline.
- symbolsize=: The size of the symbol (
small(8),medium(12),large(16), or a number from 4 to 100). - linestyle=: The style for element lines (
solid,dotted,dashed). - segment=: The segment style for element lines (
linear,step). - linecolor=: The color of the line segments.
- linewidth=: The width of the joining lines (0, 1, 2, 3, or 4).
- fillarea=: The color for the area fill. (use
noneto remove a fill) - fillbase=: The base value for the area fill:
top: Fill from the top of the graph down to the data curve.bottom: Fill from the bottom of the graph up to the data curve.min: Fill from the minimum dataset value up to the data curve.minaxis: Fill from the minimum automatic axis value up to the data curve.max: Fill from the maximum dataset value down to the data curve.maxaxis: Fill from the maximum automatic axis value down to the data curve.value: Numerical value, fill from the value up or down to the data curve.
Note: If label contains spaces, it must be enclosed in
{}.
Example:
-configureelement "IBAT label={IBAT (A)} symbol=cross symbolsize=large symbolfill=blue fillarea=lightblue fillbase=top"
-configureelement "VBAT symbolfill=green fillarea=lightgreen fillbase=35.4"
-configuregraph
Configure the last opened graph. Arguments:
- xticks=
Value: X vertical grid line positions. - yticks=
Value: Y horizontal grid line positions. - ticks=
Value: X and Y grid lines.Value: The name of a dataset or
nonefor no lines ordefaultfor the default set of 11 lines.
Example:
-configuregraph "xticks=none yticks=VBAT"
-configurexaxis
Configure an X axis on the last opened graph.
Arguments:
- Dataset: The name of the dataset with the X axis to change.
- axiscolor=: Change the color of the axis and tick marks.
- hidden=: Change the visibility (Boolean true) is hidden.
- labelcolor=: Change the color of the label.
- labelvalues=: Display (labels or numbers) ONLY for LABEL axes.
- order=: The direction (increasing or decreasing) of the axis.
- scale=: The scale (linear or logarithmic) of the axis.
- stepsize=: The size of the step between each major tick in seconds.
- subdivisions=: The number of subdivisions between major ticks.
- tickorient=: The direction (vertical or horizontal) of the tick labels.
- zoomlock=: Lock the axis to block zooming.
- custom=: A custom date/time format for some date forms.
Note: Format with spaces must be in
{}.
Example:
-configurexaxis "IBAT stepsize=1800"
Note: Limits are changed using
-fromand-to.
-configureyaxis
Configure a Y axis on the last opened graph.
Arguments:
- Dataset: Name with Y axis.
- axiscolor=: Change the color of the axis and tick marks.
- hidden=: Change the visibility (Boolean true) is hidden.
- label=: Axis label.
- labelcolor=: Change the color of the label.
- labelvalues=: Display labels/numbers (LABEL axes).
- min=: Minimum limit.
- max=: Maximum limit.
- move=: Move the axis
closestorfurthestfrom the graph area. - order=: Axis direction.
- scale=: Axis scale.
- stepsize=: Step size.
- subdivisions=: Subdivisions between ticks.
- tickorient=: Tick label direction.
- zoomlock=: Lock the axis to block zooming.
Note: Label with spaces must be in
{}.
Example:
-configureyaxis "IBAT min=0 max=20 label={IBAT (A)}"
-converttodate
Convert a non-dated dataset to a SECONDS date.
Example:
-converttodate "EL_Using-X_TD"
-deletedata
Delete the data sets named in the argument.
Example:
-deletedata "IBAT VBAT"
If argument is
ALL, all datasets are deleted.
-duplicategraph
Make a new copy of the last opened graph.
Example:
-duplicategraph
If no graphs, does nothing.
-exit
Exit immediately from PrestoPlot (no argument needed).
-exportdata
Export the data for the named sets of data to a tab separated text file.
If the only name in the list is ALL then the the data for all currently loaded data sets will be exported.
Example:
-exportdata "D:/USERS/Presto/PrestoPlot/PomExport.txt(IBAT MODEBM)"
-exportstatistics
Export the statistics for the named sets of data to a tab separated text file.
If the only name in the list is ALL then the statistics for all currently loaded data sets will be exported.
Example:
-exportstatistics "D:/USERS/Presto/PrestoPlot/Stats.txt(IBAT VBAT)"
-exportini
Export a selection of parameters to a file with the same format as the INI file.
Example:
-exportini "/path/file.ini;P1 P2 P3" # Will export parameters P1, P2 and P3 current values to file.ini.
-exportvalue
Export one dated value for each of the named data sets to a tab separated text file.
Syntax:
filename(arguments)
Arguments:
- Date: The date of the single value to export.
The default date format is ISO8601, this can be changed by prefixing the date with the name of the format.
- Mode: one of:
Before: The data value just before or at the given date or an empty value if none are before.After: The data value just after or at the given date or an empty value if none are after.At: The data value at the given date or an empty value if none.Nearest: The data value closest to the date (before if 2 points are equidistant).
- Datasets: An ordered list of datasets to export.
The Mode comment in the file contains the mode, the date in the format given to the commmand and, if different, the date in the format of the exported values.
Examples:
-exportvalue "D:/USERS/Pom.txt(2003/05/28 18:57:27.943 Nearest IBAT MODEBM)"
-exportvalue "D:/USERS/Data.csv(SECONDS:156.4 before DATA1 DATA2)"
-fft
Fast Fourier Transform Produce the Spectrum Phase and Spectrum Modulus datasets based on frequency from a datasets values.
Arguments:
- Dataset: The name of the dataset to process.
- range: The range of the dataset to use.
PAD: Add sufficient 0 elements to make the length a power of 2.TRUNC: Shorten the length to a power of 2.start:end: Numerical indexes giving the range to process.
- sampling: The custom sampling factor to use.
- resample: Resample (Boolean true) the values of the input dataset using the sampling factor and the origin date of the dataset.
Example:
-fft "VBAT range=PAD sampling=25 resample=true"
-from
Set the start date for all axes on the last opened graph.
The default date format is ISO8601, this can be changed by prefixing the date with the name of the format. (See also -to ).
Examples:
-from "JJCNES_FRAC:23691.058"
-from "SECONDS:-400.0" -to "SECONDS:10.0"
-importini
Import a set of parameters defined in a file with the same format as the INI file.
Example:
-importini "/path/file.ini" # will import the parameter values defined in file.ini.
-import
Load argument as a data file using a legacy plugin.
Example:
-import "CEV/CTV:D:/File.dat"
-importevents
Import a labelled dataset as a set of events on the last opened graph.
Arguments:
- Dataset: The name of the dataset with the X axis to import to.
- events=: The dataset to use for the event values.
- mode=: How events are processed (transition,all), either only transitions or all of the events.
- position=: The position (
toporbottom) of the labels on the event markers. - titlefont=: The font to use for the event labels.
- titlecolor=: The color of the label text.
- titleorient=: The direction (
verticalorhorizontal) of the event labels. - titleside=: The side (
leftorright) of the event labels (only useful for vertical labels). - titledate=: Display (show or hide) the event dates.
- linecolor=: The color of the event lines.
- linewidth=: The width (
0,1,2,3,4) of the event lines. - linestyle=: The style (
solid,dotted,dashed) for event lines. - showonly=: Show only events from the list.
Note: Event names with spaces must be in
{}. Wildcards supported.
Example:
-importevents "DEFICIT events=MODEBM position=bottom titlecolor=green showonly={{I LIMIT} [VI]*}"
Tip
The event name can contain the *, ? and [chars] wildcard characters.
-load
Load argument as a new data file.
If the file is a zip archive of files or a xlsx Excel file, a list of ';' separated files / sheet names can be specified after a ':' separator.
Examples:
-load "D:/USERS/Presto/PrestoDecom/Resultats/POM_2003_06_16_10_12_59_Decom.tsv"
-load "D:/USERS/Presto/PrestoDecom/Resultats/2003_06_16.zip:POM*;*AOCS*;FILE.tab"
-load "D:/USERS/Presto/PrestoDecom/Resultats/Results.xlsx:SH*;Feuille 3"
Tip
*, ? and [chars] Wildcards supported for file/sheet names.
-loadmodel
Load argument as a model file (*.pmdb, *.pmd).
Graph (
*.pgrb,*.pgr) and project (*.ppj) files can be loaded. All the data names and attributes will be used (including date axis attributes except the start and end dates), but no data will be loaded.
Example:
-loadmodel "D:/USERS/Presto/PrestoPlot/Saved/Pom.pmd"
-loadmodel "D:/USERS/Presto/PrestoPlot/Saved/Pom.ppj"
Tip
The file name can contain the *, ? and [chars] wildcard characters. The default is *.
-loadgraph
Load argument as a graph file (*.pgrb, *.pgr).
Example:
-loadgraph "D:/USERS/Presto/PrestoPlot/Saved/Pom.pgr"
Tip
The file name can contain the *, ? and [chars] wildcard characters. The default is *.
-loadproject
Load argument as a Project file (*.ppj). \
Example:
-loadproject "D:/USERS/Presto/PrestoPlot/Saved/POM.ppj"
-loadworkspace
Load argument as a workspace file (*.pwsb, *.pws).
Example:
-loadworkspace "D:/USERS/Presto/PrestoPlot/Saved/AOCSGraphs.pws"
Tip
The file name can contain the *, ? and [chars] wildcard characters. The default is *.
-logfile
Use the argument as the file to log all PrestoPlot actions to, instead of PrestoPlot.log.
note This option only works on the command line not in a PCF
-newgraph
Create a new graph using the arguments as data elements file.
Example:
-newgraph "IBAT VBAT DEFICIT"
-nosession
Ignore the default session name and always open a new PrestoPlot window.
note This option only works on the command line not in a PCF
Example:
-import "PLUGIN:D:/USERS/Presto/PrestoPlot/Saved/data.in" -nosession
-nosingle
Deprecated. Use -nosession instead (not in PCF).
-noshow
Hides Graphical user Interface (GUI) while performing operations.
note This option only works on the command line not in a PCF
Examples:
-loadgraphmodel "D:/USERS/Presto/PrestoPlot/Saved/Pom.pgr" -noshow
-commandfile PowerMgmt.pcf -noshow
Note
On Linux some window managers ignore the request to be displayed off the screen, if this is the case the Xvfb program can be used to create a virtual screen display:
# Start the Virtual X server
Xvfb :1&
# Keep the process id
let xpid=$!
# Run PrestoPlot on the new hidden/virtual display
prestoplot -display :1 -commandfile PlotCommands.pcf -exit
# stop the X server
kill $xpid
Xvfb.
-optionoverride
Temporarily override an option.
Example:
-optionoverride "SYMBOL=cross square"
See also resetoverrides.
Note: If used from the command line, the option will not be saved when quitting PrestoPlot.
-plugin
Pass argument as a parameter to the plug-ins ENTRY Entry point.
Example:
-plugin "TIMEConnect:hostname=localhost port=8888"
-printgraph
Send a copy of the last opened graph to a printer. (The printer name "DEFAULT" can be used if a default printer is declared).
arguments:
- size=: Size of the printed graph in
widthxheightformat (in pixels). Default is the screen size.
Example:
-printgraph DEFAULT
-printgraph "HPLASER01 size=600x400"
-renamedata
Rename a data set. The argument contains the current name and the new name.
Example:
-renamedata "VBAT VBATTERIE"
-renameinformation
Rename a data sets information value. The argument contains the data set name and the new information name.
Example:
-renameinformation "VBATTERIE Information of Volts Battery"
-renameunits
Rename data sets unit values. The argument contains the data set name and the new unit name.
Example:
-renameunits "V[Oo]* Volts"
Tip
The dataset name can contain the *, ? and [chars] wildcard characters to rename multiple units at the same time.
-renamexunits
Deprecated. Use -xlabel instead.
-renamegraph
Rename the last opened graph.
Example:
-renamegraph "newName"
-reportHTML
Generate an HTML report that shows all opened graphs in PNG and PGR/PGRB format, and a PCF to reopen all the graphs in PrestoPlot.
Example:
-reportHTML "D:/USERS/Presto/PrestoPlot/Saved"
-resetoverrides
Remove any overrides.
Example:
-resetoverrides
See also -optionoverride.
-spreadaxes
Spread all axes of the last opened graph to make sure the dataset won't overlay.
Example:
-spreadaxes
-saveallgraphs
Save all opened graphs with all attributes (including markers) and data values to PrestoPlot graph files (.pgrb, .pgr). The argument is the directory where the graphs will be saved, it will be created if not found. Each file has the name of the contained saved graph.
Example:
-saveallgraphs "D:/USERS/Presto/PrestoPlot/Saved"
-savegraph
Save the last opened graph with all attributes (including markers) and data values to a PrestoPlot graph file (.pgrb, .pgr). The argument is the file in which the graph has to be saved.
Example:
-savegraph "D:/USERS/Presto/PrestoPlot/Saved/Pom.pgr"
-saveproject
Save all datasets and graphs to a Project file (*.ppj). The argument is the file in which the project has to be saved.
Example:
-saveproject "D:/USERS/Presto/PrestoPlot/Saved/Pom.ppj"
-savepgd
Save the last opened graph with all attributes (including markers) a PrestoPlot Graph Description file (*.pgd). The argument is the file in which the graph has to be saved.
Two Options can be added as flags to the end of the filename using the ';' separator :
optimiselimits,xlimitsorylimits
Example:
-savepgd "D:/USERS/Presto/PrestoPlot/Saved/Pom.pgd;optimise;limits"
-saveXXX
Save the last opened graph window to the argument file as an image file. Note that the graph windows will be maximized first unless a size is specified.
XXX should be replaced by one of the following:
- png: Save the graph as a PNG file.
- gif: Save the graph as a GIF file.
- eps: Save the graph as an Encapsulated Postscript file.
- emf: Save the graph as an Extended MetaFile file.
Note: This option is only available on Windows systems.
- ps: Save the graph as a Postscript file.
Note: This option uses the ps2ps postscript converter and is only available on Linux systems supporting this command.
Examples:
-saveps "D:/USERS/Presto/PrestoPlot/Pom.ps"
-saveemf "D:/USERS/Presto/PrestoPlot/Pom.emf"
-savepng "D:/USERS/Presto/PrestoPlot/Saved/Pom.png size=600x400"
-saveXXXallgraphs
Save all open graphs as image files in the directory given as argument. Note that the graph windows will be maximized first unless a size is specified.
XXX should be replaced by one of the following:
- png: Save the graph as a PNG file.
- gif: Save the graph as a GIF file.
- eps: Save the graph as an Encapsulated Postscript file.
- emf: Save the graph as an Extended MetaFile file.
Note: This option is only available on Windows systems.
- ps: Save the graph as a Postscript file.
Note: This option uses the ps2ps postscript converter and is only available on Linux systems supporting this command.
Examples:
-savegifallgraphs "D:/USERS/Presto/PrestoPlot/Saved"
-saveemfallgraphs "D:/USERS/Presto/PrestoPlot/Saved"
-session
Use the argument (Letters and Digits or _ (underscore) only) as the session name.
- From the command line, if a PrestoPlot exists with this session name the rest of the command line will be sent to it, and this PrestoPlot terminates, otherwise this PrestoPlot will start with the session name.
Note
If used on the command line it MUST be the first option on the line.
- From a PCF, The current session name can only be changed if no other session has the name.
Example:
-session MY_SESSION
-session ""
Tip
Use "" to remove session processing.
-set variable=value
Initialise a command line local variable.
Example:
-set "Directory = C:/User/Results"
${Directory}
Note Any spaces are removed from the variable name and value, to include spaces in the value it is necessary to surround the value with
{}'s.Note A special variable
workingdirectorycan be set in the preferences command entry to allow relative paths for command entries.
-set "workingdirectory = C:/User/Results"
-setlabels
Replace the set of label values for a dataset.
Arguments:
- Dataset: Replace the set of label values for a dataset.
- Label+value list: A set of
Label=valueitems separated by;. If not present then remove any labels and set to FLT type.
Example:
-setlabels "MODEBM I LIMIT=0;V LIMIT=1;TRICKLE=2"
-sortalldatasets
Sort any loaded datasets into chronological order (apply to dated datasets only).
-spreadlabels
Spread a Labelled dataset by renumbering raw values starting from the BaseLabelOffset configuration value.
Arguments:
- Dataset: The name of the dataset to spread.
- mode: The method used for spreading, either
allorflatten(Optional).all: Renumber all of the raw label values.flatten: Renumber the raw values and remove any that are not present in the dataset (Default mode if not present).
Example:
-spreadlabels "MODEBM flatten"
-title
Set or change the last opened graph title.
Example:
-title "My title"
-to
Set the end date for all axes on the last opened graph. The default date format is ISO8601, this can be changed by prefixing the date with the name of the format. (See also -from ).
Example:
-to "GPS_SECONDS:1819 345600.000"
-version
Write a version message to the PrestoPlot.log file and exit. On Linux the version will also be written to the standard output.
Warning
This option overrides any other command line options, which will not be processed.
-xlabel
Change the X axis label for a given dataset. Any datasets using the same date or from the same original file will also be changed. The argument contains the X axis data set name and the new unit name.
Examples:
-xlabel "DEFICIT:Ground Date"
-xlabel "DEFICIT_FFT_F:Hz_2"
Any errors or messages during command line processing are added to the Log File.
TIP: If results are unexpected, check PrestoPlot.log for error messages.
File path names
PrestoPlot recognises three types of file path:
- None - Files without a path (e.g.
Model2.pmdorPOM1.tsv) these files will use the current working directories (one for Data files and one for Model/Graph/WorkSpace/Command/Image files) from the ini file for the PrestoPlot used on the command line. - Relative - Files with a relative path (e.g.
MODELS/Model2.pmdor./POM1.tsv) will be accessed relative to the current directory. - Full - Files with a complete path (e.g.
D:/MODELS/Model2.pmdorF:/DATA/POM1.tsv) will be accessed using the path specified.