PDMSPlot Service
PDMSPlot Service
The PDMS Plot Service (PPS) is normally initiated from within PDMS when a PDMS plot file or
files are generated. Under the control of Appware the PPS is automatically started and is sent
either complete plot jobs or individual plot files and the associated information required for
printing them. Once started, PPS will persist and is visible on the taskbar. It can span from one
PDMS module to another and from one PDMS session to another. Print settings will only need to
be set once as they are maintained within PPS.
PDMS Appware: Prepares job files or sends individual commands by running the
PlotServCmd program with command line arguments. The appware should wait for
PlotServCmd to complete.
PlotServCmd: Receives the command line and then searches for PlotServ and if it cannot
find it will use registry information and start it automatically.
When a PlotServ has been found it may be busy and some waiting may be required before
to commands can be sent to it. PlotServCmd completes when the message has been sent
to PlotServ.
PlotServ: When started by PlotServCmd it is run as a normal application program but is
minimized on the taskbar. It has a normal user interface in the style of a control.
The upper part of the user interface form is concerned with browsing for plotfiles and
selecting and previewing them prior to printing.
The lower part of the form contains a list of plotfiles, a black and white/Colour/Grayscale
selector and an Actual/Scaled size selector and PrintSetup/Preview/Clear List/Remove
/Print Selected/Print List buttons.
This user interface is available for general use but most of it is also available via the
commands set from PlotServCmd together with some specific functionality as well.
PlotViewer: Functionality from PlotViewer is the basis for the printing service where it
is an ActiveX EXE that requires to be registered when it is installed, e.g. plotviewer
/regserver. At other times it can be used for its other purposes, as before.
plotservCmd
PlotServ
PlotServ needs no preparation at install time for its settings to be stored in the registry under the
following key:
HKEY_CURRENT_USER\Software\AVEVA\PlotServ\Settings
The installation of plotservCmd, PlotServ and PlotViewer is now done automatically whenever
plotservCmd is run. The previous method is still active but should not be used.
The plotservCmd program looks for the registry path where the pathname of the directory
containing PlotServ.exe is to be found. If it is not found plotservCmd assumes that
PlotServ and PlotViewer are on the current search path and will then do its own
installation. The registry key is:
HKEY_LOCAL_MACHINE\Software\AVEVA\PlotServ\2.2
PlotViewer
PlotViewer needs no preparation at install time for its settings to be stored in the registry under
the following keys:
This is an ActiveX EXE that needs to be registered as a server before it can is used by PlotServ.
This is done automatically when PlotViewer is run for the first time but it can be done as part of
the installation by running PlotViewer.exe /regserver (or PlotViewer.exe /unregserver for
uninstallation).
PlotServ is controlled under Appware control from PDMS Design and other modules.
The commands should always be run as part of a PlotServ job that is complete in itself, preparing
the printing conditions, selecting whether to preview, printing and eventually clearing the print
list.
Jobs should be run as background processes so that the PDMS user interface is not blocked while
they are being processed. Running in background mode is selected by adding an “&” to end of a
command or by running it with from a Windows start command:
The best way to organize the printing of plots from a PDMS module is to prepare a job file
containing the sequence of commands to select the plot files, set colour options and scaling
options, to prompt the user to setup the printer and so on.
Example 1: Consider how the action corresponding to a File > Print menu selection would be
organized. The job file is named job.txt:
This job is sent to the PDMS Plot Service with the following Pml command:
Example 2: Consider how an action corresponding to a File > Print SetUp menu selection would
be organized. The job file is named setupjob.txt:
Example 3: Consider how to preview files before printing them. Start with a set of commands in
the job file previewjob.txt.