DEFINE_VAR VALUE issue
Hello!
I am trying to prompt users to select a filename/directory to save a file so I can save it in a variable and use it within my script.
I would like the default location to be the folder of the script itself, however this is not working as expected when I have "FILE_MUST_EXIST=NO".
I am trying to prompt users to select a filename/directory to save a file so I can save it in a variable and use it within my script.
I would like the default location to be the folder of the script itself, however this is not working as expected when I have "FILE_MUST_EXIST=NO".
DEFINE_VAR NAME="GRID_FILE_TO_SAVE" PROMPT="FILE" VALUE="%SCRIPT_FOLDER%XX_NADXX_%FNAME_PARENT_DIR%.gmg" ABORT_ON_CANCEL=YES FILE_MUST_EXIST=NO PROMPT_TEXT="Select a folder and filename to save the grid file"
When I change it to "FILE_MUST_EXIST=YES" it shows the correct folder. I guess the only difference is the "save as" vs the "open file" dialog windows. I don't want users to be confused when they see "open file", when they are trying to save one.
Any ideas why this is not working?
Thanks
Any ideas why this is not working?
Thanks
Tagged:
Answers
-
Actually, when FILE_MUST_EXIST=YES it doesn't let me create a new file, it requires an existing file for sure.
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website