Global Mapper v25.0

Import script not working

fvidania
fvidania Global Mapper UserTrusted User
edited December 2014 in GM Script Language
Hello all,

First of all, I want to say that I'm new to this Scripting world. I'm trying to do one easy script to import a .csv that I have in my PC. I know it's a very simple script, but I want to practice and see how the language works.

I wrote the script and when I open it with GM (File/Run Script...), I click on Run Script and this is what happen.

the screen says: "Removed all loaded overlays" "Importing ASCII file C:.....¨and nothing else. That´s all it does. Before this, the software asks me for the projection, I chose NAD83 UTM and click OK. After this, nothing else happens. It´s a very small CSV, only 5 points.

See my language:
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
IMPORT_ASCII \
FILENAME="C:\Users\fer.surfacefer\Desktop\TEST.CSV" \
TYPE=POINT_ONLY \
COORD_DELIM=COMMA \
SKIP_COLUMNS=1\
COORD_ORDER=Y_FIRST \
INC_COORD_LINE_ATTRS=YES\
INC_ELEV_COORDS=YES\


What am I doing wrong? what am I missing?

Thanks

Comments

  • tjhb
    tjhb Global Mapper User Trusted User
    edited December 2014
    There's an extra backslash ending the last line. It tells GM to expect more parameters to the IMPORT_ASCII command, but there are none. So remove that.

    You might also have problems with the apparent space after the file extension.
  • fvidania
    fvidania Global Mapper User Trusted User
    edited December 2014
    Thank you! I had two problems. One that last backslash at the end.

    Other is that I wasn't checking the box "Run Script in the Context of the Main View"

    After those two changes, everything works. I've been able to load a dxf as well in the same script, so I'm understanding everything now.