what file format should a script be.

I have tried to create a script as a .txt file but GM does not recognise ( show to select) this in the run script command.
I am new to GM so any help will be great.
If I can download a file to start this would be easiest.
Thank you

Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,986
    Answer ✓
    Hello,

    A script should be a text file with a .gms extension, but you can use a .txt file. On the dialog to open a script file, choose "All Files" from the file type list, and .txt files will be shown in the list.

    Here is a link to a recorded webinar that is an introduction to scripting in Global Mapper.

    Cheers,
    Bob

Answers

  • LewisLewis Posts: 2
    Great thanks for that. It did work.
    I'm also interested in knowing how to script or query "not equal to" in GM. for example all road features with a name not equal to "street".
    Thanks

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,986
    Hello,

    Use the EDIT_VECTOR command to select a subset of your features and do something to them.  Here is an example that uses the "not equal" operator:
    EDIT_VECTOR COMPARE_STR="ATTR!=street" COPY_TO_NEW_LAYER NEW_LAYER_NAME="NON_STREETS"
    That command will find all features where the attribute value is not "street" and copy them to a new layer called "NON_STREETS".

    You can find the full documentation for the EDIT_VECTOR command here.

    Cheers,
    Bob
Sign In or Register to comment.