13.11.2012 Views

Open Printable/Searchable Copy - Global Mapper

Open Printable/Searchable Copy - Global Mapper

Open Printable/Searchable Copy - Global Mapper

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

You can run a <strong>Global</strong> <strong>Mapper</strong> script file automatically be passing it on the command line to the <strong>Global</strong><br />

<strong>Mapper</strong> .exe file. The script file will be run with no user interface displayed and <strong>Global</strong> <strong>Mapper</strong> will<br />

immediately exit when the script file completes processing. This allows you to easily run <strong>Global</strong> <strong>Mapper</strong><br />

scripts from another application or from a DOS batch file. Note that your script files need to have an extension<br />

of .gms for this to work.<br />

Comments<br />

Any lines that begin with the forward slash character (/) are considered comments and are ignored by the<br />

script processing engine. This means that you can use C or C++ style comments like // or /* at the start of your<br />

line.<br />

ADD_MEASURE_ATTRS<br />

The ADD_MEASURE_ATTRS command allows you to add/update feature measure attributes to all of the<br />

line and area features in a loaded vector layer.<br />

The following parameters are supported by the command:<br />

• FILENAME - filename of the layer to update. If an empty value is passed in, all layers that were<br />

created by the script, such as those from a GENERATE_CONTOURS command, will be updated.<br />

You can also pass in the value 'USER CREATED FEATURES' when running a script in the context<br />

of the main map view or loading a workspace to have the 'User Created Features' layer updated.<br />

CALC_ATTR<br />

<strong>Global</strong> <strong>Mapper</strong> User's Manual<br />

The CALC_ATTR command allows you to calculate a new attribute value (or update the value for an existing<br />

attribute) for features in a layer based on a source attribute (including things like the feature label or type) and<br />

a second value. The second value can be a specified string or number, or the value from another attribute of<br />

the feature.<br />

The following parameters are supported by the command:<br />

• FILENAME - filename of the layer to update. If an empty value is passed in, all loaded vector layers<br />

will be updated. You can also pass in the value 'USER CREATED FEATURES' when running a<br />

script in the context of the main map view or loading a workspace to have the 'User Created Features'<br />

layer updated. If you don't pass anything in all vector layers will be operated on.<br />

• TYPE - specifies what type of operation to use when assigning the new attribute value.<br />

♦ COPY - copies the source attribute value into the new attribute<br />

♦ ADD - numerically adds the second value to the source value and saves the result into the<br />

new attribute<br />

♦ SUBTRACT - numerically subtracts the second value from the source value and saves the<br />

result into the new attribute<br />

♦ MULTIPLY - numerically multiplies the second value by the source value and saves the<br />

result into the new attribute<br />

Table of Contents 241

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!