SAVE_WORKSPACE variables

pypirpypir Posts: 5
edited October 2015 in GM Script Language
Is this function supports variables like %DIR%,%SCRIPT_FOLDER%?
I have many typical folders that needs to create similar workspace files from tifs in its.
I wrote this script:

GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
DIR_LOOP_START DIRECTORY="" FILENAME_MASKS="*.tif" RECURSE_DIR="NO"
IMPORT FILENAME="%FNAME_W_DIR%"
DIR_LOOP_END
SAVE_WORKSPACE FILENAME="%SCRIPT_FOLDER%\maps\workspace.gmw"
UNLOAD_ALL

Import is OK, but it can't save workspace in folder, what i'm doing wrong?

Answers

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,237
    It appears that you have not defined a value for the SCRIPT_FOLDER variable.  You should use the DEFINE_VAR command as follows:
    DEFINE_VAR NAME="SCRIPT_FOLDER" VALUE="C:\FOLDER"
    replacing C:\FOLDER with the folder name you want to use.
Sign In or Register to comment.