MapLink Pro Studio 11.1
Loading...
Searching...
No Matches
Batch Processing
Batch Processing Mode

Batch Mode can be initiated from a script or a shortcut. It enables you to load projects and generate maps using a set of commands defined in a batch file. To invoke Batch Mode processing from the command line, run:

maplinkstudio.exe /batch 'batchfile'

where 'batchfile' is the full pathname of the batch file.

The batch file should be a text file with the following structure:

TSLMAPLBATCHCOMMANDS 100
<command>
<command>
<command>
...
<command>
QUIT

The available commands are as follows:

CommandDescription
LOGFILE;<logfile> Redirect the log output for all subsequent operations to the specified file. This should be the first command in the batch file.
OPEN;<projectfile> Opens a MapLink Pro Studio project. This should be the second command in the batch file.
CREATEOUTPUTMAP;ALL;<mapfile> Creates an output map containing all layers defined in the project file.
CREATEOUTPUTMAP;SELECTED;<mapfile>;<layerlist> Creates an output map containing the specified layers.
CREATEOUTPUTMAP;MERGE;<mapfile>;<layerlist> Processes the specified layers and merges them into an existing map.

where:

  • <logfile> is the full path name of the log file
  • <projectfile> is the full path name of the project file
  • <mapfile> is the full path name of the output map file
  • <layerlist> is the list of layers to be processed, with the following syntax:
    • <layerlist> := <layername>{;<layername>}

A sample batch file is shown below.

TSLMAPLBATCHCOMMANDS 100
LOGFILE;c:\MapLink\Test.log
OPEN;c:\MapLink\Test.mlp
CREATEOUTPUTMAP;ALL;c:\MapLink\All\All.map
CREATEOUTPUTMAP;SELECTED;c:\MapLink\Selected\Selected.map;Layer1
CREATEOUTPUTMAP;SELECTED;c:\MapLink\Merge\Merge.map;Layer1;Layer4
CREATEOUTPUTMAP;MERGE;c:\MapLink\Merge\Merge.map;Layer2;Layer3
QUIT

This batch file performs the following actions:

  • It creates (in \All\All.map) a map containing all layers within the project file Test.mlp
  • It creates (in \Selected\Selected.map) a map containing just Layer1 from the project file Test.mlp
  • It creates (in \Merge\Merge.map) a map containing just Layer1 and Layer4 from the project file Test.mlp
  • It then merges into the existing \Merge\Merge.map the layers Layer2 and Layer3 from the project file Test.mlp
  • Any errors that are encountered during the execution of the batch file are written to the log file.