FindMap.com.au - Mapping Software & Location Services and Content

Home - Find & Contact Us - Our Clients - News - Links

Help - Batch Commands

 
  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:

  • UPPER and lower case in keywords and parameter names

  • The setting value must ALWAYS be given in double quotes.

Is it NOT important as to how and where whitespace such as empty lines, spaces, tabs are placed.

  • A simple example using minimal parameters is here.

  • An example using all parameters is here.

 

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:

  • Table = full path of .csv file containing values to be used in creating a thematic map.

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 = name of directory containing view files to be used.

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

 

  • ImageDir = name of directory where image files corresponding to ViewDir will be placed.

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.

  • ImageNamePrefix = prefix to use before image name when creating image file.

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_"

  • SaveAs = valid image file extension and file type.

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"

  • ImageSize = size of image to use.

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"

 
   
   
   
 
 

- Updated Saturday 6th September 2003 -

All material and contents are Copyright © 2001-2003 FindMap Pty. Ltd. All rights reserved

info@findmap.com.au - Find & Contact Us