UNLOAD_LAYER

The UNLOAD_LAYER command allows you to unload all previous loaded layers with a given filename. This is useful if you don't want to unload all previously loaded layers just to get rid of a few of them.

The following parameters are supported by the command:

  • FILENAME - filename of the layer to unload. If an empty value is passed in, all layers that were created by the script, such as those from a GENERATE_CONTOURS command, will be unloaded. This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2". When running the script in the context of the main map view (including loading a workspace) you can also pass in the value 'USER CREATED FEATURES' to have the 'User Created Features' layer updated or 'SELECTED LAYERS' to have any layers selected in the Control Center unloaded. You can also pass in the full description of the loaded layer to use in case you want to unload a layer not loaded from a file.
  • SHOW_WARNINGS - specifies whether or not to show a warning if no layers matching the FILENAME are found. Defaults to on, use SHOW_WARNINGS=NO to disable.