Global Mapper v25.0

Import_ascii

Sean Bampton
Sean Bampton Global Mapper UserTrusted User
edited September 2014 in GM Script Language
I'm working on a simple script in 14.2.6 to import a text file of coordinates and export each shape, point and line to individual files, into a folder called Shapes.

My problem is this:
WARNING: Unknown parameter <IMPORT_ASCII> ignored.
Removed all loaded overlays.

I've read the help file for this command and I'm pretty sure I'm using it right.

My script looks like this so far:
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL \
IMPORT_ASCII \
FILENAME="C:\Users\Admin\Desktop\Coords.txt" \
PROJ="C:\Users\Admin\Desktop\coords.prj" \
TYPE=POINT_AND_LINE \
COORD_DELIM=WHITESPACE \
COORD_ORDER=Y_FIRST \
CREATE_AREAS_FROM_LINES

I've tried running the script directly from the desktop and also from inside the GM GUI (File > Run Script)

Assistance would be greatly appreciated.

Comments

  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited September 2014
    Hi Sean,

    You should remove the "\<newline>" at the end of your UNLOAD_ALL command (see code below). That is causing Global Mapper to interpret the following line as a continuation of the current command, so it thinks that IMPORT_ASCII is a parameter on the UNLOAD_ALL command. That is causing the error message.
    [COLOR=#333333]GLOBAL_MAPPER_SCRIPT VERSION=1.00[/COLOR]
    [COLOR=#333333]UNLOAD_ALL[/COLOR]
    [COLOR=#333333]IMPORT_ASCII \[/COLOR]
    [COLOR=#333333]FILENAME="C:\Users\Admin\Desktop\Coords.txt" \[/COLOR]
    [COLOR=#333333]PROJ="C:\Users\Admin\Desktop\coords.prj" \[/COLOR]
    [COLOR=#333333]TYPE=POINT_AND_LINE \[/COLOR]
    [COLOR=#333333]COORD_DELIM=WHITESPACE \[/COLOR]
    [COLOR=#333333]COORD_ORDER=Y_FIRST \[/COLOR]
    [COLOR=#333333]CREATE_AREAS_FROM_LINES[/COLOR]
    

    Cheers,

    Bob
  • Sean Bampton
    Sean Bampton Global Mapper User Trusted User
    edited September 2014
    Hahaha. Thanks Bob. Sometimes its the simplest things that stop us.