| Back To Help Index Overview
Batch commands are used to apply a process to a set of
files without interaction or intervention necessary.
Postcode Professional
supports batch processing using commands in a text file
and using the text file with a command line switch to
invoke it as follows:
pcpro.exe -b mycommands.cnf
where:
pcpro.exe
is the name of the application program
executable.
-b
is the switch to say file following contains
batch commands.
mycommands.cnf
is the text file containing batch
commands. The .cnf is a
"configuration" extension used a a
convention for this file format.
When batch files are used the application
automatically minimises, processes the files and then
exits automatically - no interaction is needed.
The commands available in Postcode Pro
are oriented towards taking a set of map views and saving
them in an equivalent set of image files. Optionally a
table of values may be in the map to create a thematic
map.
Batch file format
def Settings
{
.....
}
where:
def Settings starts
the definition of the batch settings
opening and closing braces {}
gives the start and end of the settings.
... are the settings
which are in the format:
SomeParameter =
"some setting or value"
The following are important:
Is it NOT important as to how and where
whitespace such as empty lines, spaces, tabs are placed.
Batch Parameters
Not all parameters are required
and defaults are used in their place as needed.
The following is a complete listing of
available parameters:
def Settings
{
Table = "..."
ViewDir = "..."
ImageDir = "..."
ImageNamePrefix =
"..."
SaveAs = "..."
ImageSize = "..."
}
Where:
If a .ini file of
the same name and path exists it will be used to get
custom range and other parameters to create the
thematic map.
Example: Table = "c:\mydata\myvalues.csv"
ViewDir
is a required parameter.
The number of map views and images to
be created is taken from the number of view files in
this directory.
The name of each image created will
be taken from the view name as well as optional name
prefix.
When Postcode Pro saves a view it
will have the extension of .view.txt and is saved in
the subdir defaultuser\views
in the case of the default profile or in the subdir profile\xxxx\views
in the case of the profile xxxx.
To get info on creating
and using profiles click here.
The name of the directory can be:
relative to the
current application program such as:
ViewDir =
"defaultuser\views"
ViewDir =
"profile\xxxx\views"
in the case of the views
being in their standard locations in the
application directory structure or
absolute path such
as:
ViewDir = "x:\somewhere\thisproject"
in the case of *.view.txt
copied to x:\somewhere\thisproject
If ImageDir is not given
then the same dir as ViewDir is used.
If view files in ViewDir have
the name View1,View2 and so on then the
image files will have the name View1,View2
with an image file type extension.
If view files in ViewDir have
the name View1,View2 and ImageNamePrefix
is "Report_" (for example) then the
image files will have the name Report_View1,
Report_View2 with an image file type extension.
Example: ImageNamePrefix =
"Report_"
If SaveAs is not given then
"gif" is used.
Only
"gif" is supported in the initial version,
other file types will be supported in an update.
Example: SaveAs = "gif"
If ImageSize is not given
then the current application default image size is
used.
If ImageSize is given then
both the X and Y image size parameters must be
specified in that order.
No checking is made on the value of
the parameters and ability to handle very large sizes
are memory and Windows version dependent.
Example: ImageSize =
"600,400"
|