Layer Groups

AutoCAD Map 3D Geospatial Platform API

Layer Groups

Layers can be optionally grouped into layer groups. Layers in the same group are displayed together in the Display Manager.

The visibility for all layers in a group can be set at the group level. If the group visibility is turned off then none of the layers in the group will be visible, regardless of their individual visibility settings. If the group visibility is turned on, then individual layers within the group can be made visible or not visible separately.

Layer groups can be nested so a group can contain other groups. This provides a finer level of control for handling layer visibility or for grouping layers into legend groups.

AcMapMap.GetLayerGroups() returns an MgLayerGroupCollection object that contains all the top-level layer groups in the map.

Each layer group in a map must have a unique name, even if it is nested within another group.