Export only selected rows in v16

George Chandeep CoreaGeorge Chandeep Corea Global Mapper UserPosts: 62Trusted User
edited December 2015 in GM Script Language
Is it possible to export only selected data in gms?

I see there is EXPORT_LAYER but how do I tell it to do the following for example?
Select all rows where contour_type=major export selection to %FNAME_WO_EXT%_5m.tab
Select all rows where contour_type!=minor export selection to %FNAME_WO_EXT%_1m.tabThis will be in
EXPORT_VECTOR FILENAME="%FNAME_WO_EXT%.tab" TYPE=Mapinfo INC_LAYER_ATTR=NO INC_ELEV_ATTR=YES
Tagged:

Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,218
    Answer ✓
    You  can try something like this:
    EDIT_VECTOR COPY_TO_NEW_LAYER=YES NEW_LAYER_NAME="Major" \
        COMPARE_STR="CONTOUR_TYPE=major"
    EXPORT_VECTOR FILENAME="<filename>" TYPE=MAPINFO EXPORT_LAYER="Major"
    UNLOAD_LAYER FILENAME="Major"
    EDIT_VECTOR COPY_TO_NEW_LAYER=YES NEW_LAYER_NAME="Minor" \
        COMPARE_STR="CONTOUR_TYPE=minor"
    EXPORT_VECTOR FILENAME="<filename>" TYPE=MAPINFO EXPORT_LAYER="Minor"
    UNLOAD_LAYER FILENAME="Minor"

Sign In or Register to comment.