IF, ELSE_IF, ELSE, and END_IF question

MorganRSMorganRS Global Mapper UserPosts: 77Trusted User
Is it possible to use  the IF command based on errors or failures? I know that my syntax will be incorrect for this command, but just for a rough idea of how I'd like to use this if possible
For example
...
EXPORT_VECTOR FILENAME="G:\Users\Morgan\DATA_STATE\AL\TEMP\TEMP_.mp" TYPE=POLISH_MP GRID_TYPE_CELL_SIZE="0.25,0.25" MAP_NAME=%TILE_FNAME_WO_EXT% TEMPLATE_FILENAME="%template_path%\dict-SMAv28_%FID%.mp" MP_EXPORT_TEMPLATE_FILES=NO MP_COPY_ENTIRE_TEMPLATE=NO MP_IMAGE_ID=0 GRID_NAMING=SEPARATE GRID_NAMING_COLS="NUM,1," GRID_NAMING_ROWS="ALPHA,A," GRID_NAMING_SEPARATOR=""
ELSE RUN_COMMAND COMMAND_LINE="'G:\Users\Morgan\Scripts\email_python.bat'"  CAPTURE_RESULT="%RESULTS%" WAIT_FOR_COMPLETE=NO


Where if there were any errors thrown out during an export, or any command, the script would jump to my ELSE command.



Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,218
    Answer ✓
    The IF command can only be used to test the value of a variable, not the result of running another command.
Sign In or Register to comment.