Global Mapper Pro

Define_var -- prompt

I'm having some trouble with the define_var prompts. My script is as follows:

GLOBAL_MAPPER_SCRIPT VERSION="1.00"

//import all control points
IMPORT FILENAME=H:\Control_points\2016\Mascot_Spirit_GPS_UTM.shp TYPE="SHAPEFILE"

//define export Location/filename and select the project area
DEFINE_VAR NAME=PROJECT_CONTROL PROMPT="DIR" VALUE=H:\QC\ PROMPT_TEXT="Select output location"
DEFINE_VAR NAME=PROJECT_AREA PROMPT=FILE VALUE="H:\QC\.shp" PROMPT_TEXT="SELECT PROJECT AREA"

//export all control within defined polygon
EXPORT_VECTOR FILENAME=%PROJECT_CONTROL%Control.shp TYPE=SHAPEFILE GEN_PRJ_FILE=YES SHAPE_TYPE=POINTS POLYGON_CROP_FILE="%PROJECT_AREA%" POLYGON_CROP_USE_ALL=YES INC_ELEV_ATTR=YES

It's my understanding that this should set PROJECT_CONTROL as my output location while allowing me to pick another shapefile as an area  to crop to (PROJECT_AREA). It should also take me to H:\QC\ for me to select these files and display my prompt text at the top of each window.

However, the Prompt=file function seems to open a window that does not display my prompt text. It instead is a "save file" window. When I select the file I want it asks if I want to overwrite it, as if I'm about to save over it (which doesn't happen, it loads it properly). Why is it doing this? I would like it to display my given text so I and others know what the scripted prompt is asking for.

Thanks in advance

 

Best Answer

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Accepted Answer
    Hello,

    Try adding FILE_MUST_EXIST="YES" to the DEFINE_VAR command.

    Cheers,
    Bob
Sign In or Register to comment.