Global Mapper 16
Results 1 to 5 of 5
  1. #1
    Global Mapper User
    Join Date
    Oct 2011
    Posts
    121

    Default Allow script parameters in batch mode.

    Mike,

    Would it be possible to allow passing parameter values on the command line when running a script in batch mode ?

    Given the following example

    Code:
    GLOBAL_MAPPER_SCRIPT VERSION=1.00
    SET_LOG_FILE FILENAME="G:\Canvec1.log"
    
    DEFINE_VAR NAME="iPath"        VALUE="S:\Data\Geomatique\Cartes\Canvec" PROMPT=NO
    DEFINE_VAR NAME="lPath"        VALUE="S:\Data\Geomatique\Cartes\Geobase\Elevation\50K" PROMPT=NO 
    DEFINE_VAR NAME="ePath"        VALUE="S:\Data\Geomatique\Cartes" PROMPT=NO
    DEFINE_VAR NAME="Projet"    VALUE="Maison" PROMPT=NO
    DEFINE_VAR NAME="Zone"        VALUE="031" PROMPT=YES PROMPT_TEXT="Zone Number:"
    DEFINE_VAR NAME="Section"    VALUE="E" PROMPT=YES PROMPT_TEXT="Section"


    command line arguments would allow to pass the prompted variables to the script.


    global_mapper13 scriptfile.gms 'Zone=032' 'Section=A'

    I built a script that I will need to run 160 times with different values (10 zones with 16 sections each). Now I do it interactively and I type in my values but it would be nice if I could make a batch file to run GM with my parameters 160 times and just let it go unattended.

  2. #2
    Administrator
    Join Date
    Jun 2007
    Posts
    16,451

    Default

    There is actually additional looping support coming in the v14 release that would allow you to loop over the numbers you need from an outer script, then use EMBED_SCRIPT to call your other script after using DEFINE_VAR based on the loop values. See http://www.globalmapper.com/helpv14/...var_loop_start for how the new looping support will function. We expect to release v14 in early September.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com

  3. #3
    Global Mapper User
    Join Date
    Oct 2011
    Posts
    121

    Default

    Mike,

    I'm aware of the coming VAR_LOOP as I'm the person who suggested it .

    Does it support looping on alphabetical sequences like A to P ? Maybe I misunderstood but I thought it would only work for numbers.

  4. #4
    Administrator
    Join Date
    Jun 2007
    Posts
    16,451

    Default

    Ah yes it was just written to loop over numbers, but I've just updated it to work over ranges of characters as well now too, so you will be able to loop over A to P.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com

  5. #5
    Global Mapper User
    Join Date
    Oct 2011
    Posts
    121

    Default

    Wonderful.

    Thank's Mike. I'm really looking forward to v14.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 07-04-2012, 03:34 PM
  2. Passing parameters to a script
    By Boyd in forum GM Script Language
    Replies: 1
    Last Post: 08-29-2011, 02:20 AM
  3. Help with merge script for IKONOS bans (BATCH MODE)
    By kabeck in forum Technical Support
    Replies: 4
    Last Post: 02-10-2011, 04:56 AM
  4. Batch mode script warning
    By chrise in forum Technical Support
    Replies: 1
    Last Post: 09-17-2009, 03:51 PM
  5. Batch Mode Export always Anti-Aliases
    By Matt in forum Bug Report
    Replies: 8
    Last Post: 12-16-2008, 04:14 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.1
Copyright 2008-2012 Globalmapperforum.com
All times are GMT. The time now is 12:06 PM.
vBulletin 4.0 skin by CompleteVB