SetLegendDisplayStatus()

Summary

Controls whether a layer, set, or a theme is displayed in the legend.

Syntax

SetLegendDisplayStatus(string set_or_theme_name, boolean display_flag)

Argument Contents
set_or_theme_name The name of the set or theme
display_flag "True" to display the set or the theme in the legend; "False" to hide the set or the theme

Notes

  • If the set name is of the form layer|, indicating all features in a layer, SetLegendDisplayStatus() will control whether the layer name is or is not displayed in the legend.

Examples

// Hide all the selection sets for the Streets layer
sets = GetSets("Streets")
for i = 1 to sets.length do
SetLegendDisplayStatus(sets[i], "False")
end
// Hide the listing for the current layer
SetLegendDisplayStatus( GetMap() + "|" + GetLayer() + "|", "False")
// Show the first selection set in the current layer
sets = GetSets()
SetLegendDisplayStatus( GetMap() + "|" + GetLayer() + "|" + sets[1], "True")

Error Codes

Error Type Meaning
NotFound The set or theme was not found
Error The set or theme was invalid

See Also

Function Summary
GetLegendDisplayStatus() Determines whether a layer, set, or a theme is displayed in the legend