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

Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,161
    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

Answers

  • DANBRIDANBRI Posts: 23
    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
Sign In or Register to comment.