Global Mapper v25.0

Call variables in Batch Mode ?

Hello everybody

I want to run my script .gms and declare the variables and their values ​​used in it without editing the original script using cmd command line in batch mode.

How can i called value of variable using batch mode and related it by her script .gms?

Best regards

DANBRI

Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Answer ✓
    Hello,

    When running in batch mode you can define variables on the command line so they will be available when running the script. You provide pairs of tokens on the command line, after the file name. Each pair must look like:

    -<var name> <var value>
    or
    /<var name> <var value>

    Example command line:
     global_mapper.exe "c:\temp\myscript.gms" -VAR1 01 -VAR2 33
    This defines two variables that can be referenced in the script as %VAR1% and %VAR2%. 

    Cheers,
    Bob
  • Hello Bob
    I think my probleme it's about "/showprogress" option,...i put this option to show progresss during processing but my  the script saw this option as a variable and asks for her value like error.
    Iremoved it and i put this option inside my script. it work very well :) .
    Best regards 
    DANBRI