Global Mapper v25.0

Drop layer native extension in export

MorganRS
MorganRS Global Mapper UserTrusted User
edited June 2015 in GM Script Language
I'm having an issue when running a script that splits my export by layer. The script exports the layer extension that is displayed in the Overlay Control Center and puts a .shp extension on the end. While this doesn't matter to Global Mapper, other programs don't recognize the filetype. Script looks like this
GLOBAL_MAPPER_SCRIPT VERSION=1.00LAYER_LOOP_START FILENAME="*"


SET_LAYER_OPTIONS FILENAME="%LAYER_DESC%" HIDDEN=NO


EXPORT_VECTOR FILENAME=C:\export folder\%LAYER_DESC%.shp TYPE=SHAPEFILE SHAPE_TYPE="POINTS" GEN_PRJ_FILE=YES




SET_LAYER_OPTIONS FILENAME="%LAYER_DESC%" HIDDEN=YES


LAYER_LOOP_END

How do I get Global Mapper to leave the files import extension out during export?

Thanks

Comments

  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited June 2015
    Hi,

    I suggest that you try using %LAYER_FNAME_WO_EXT% instead of %LAYER_DESC% in the FILENAME parameter of your EXPORT_VECTOR command.

    Cheers,

    Bob
  • MorganRS
    MorganRS Global Mapper User Trusted User
    edited June 2015
    Perfect! Thank you very much