Drop layer native extension in export

MorganRSMorganRS Global Mapper UserPosts: 77Trusted 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_bobbmg_bob Global Mapper Programmer Posts: 2,233
    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
  • MorganRSMorganRS Global Mapper User Posts: 77Trusted User
    edited June 2015
    Perfect! Thank you very much
Sign In or Register to comment.