This document is archived and information here might be outdated.  Recommended version.


IMapLayers.InsertLayersInGroup Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapLayers Interface > IMapLayers.InsertLayersInGroup Method
ArcGIS Developer Help

IMapLayers.InsertLayersInGroup Method

Inserts layers at a given index of the map's group layer.

[Visual Basic .NET]
Public Sub InsertLayersInGroup ( _
    ByVal pGroup As IGroupLayer, _
    ByVal pLayer As IEnumLayer, _
    ByVal autoArrange As Boolean, _
    ByVal position As Integer _
)
[C#]
public void InsertLayersInGroup (
    IGroupLayer pGroup,
    IEnumLayer pLayer,
    bool autoArrange,
    int position
);
[C++]
HRESULT InsertLayersInGroup(
  IGroupLayer* pGroup,
  IEnumLayer* pLayer,
  VARIANT_BOOL autoArrange,
  long position
);
[C++]
Parameters
pGroup [in]

pGroup is a parameter of type IGroupLayer* pLayer [in]
pLayer is a parameter of type IEnumLayer* autoArrange [in]
autoArrange is a parameter of type bool position [in]
position is a parameter of type long

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The autoArrange parameter controls the ordering of the layers.  If autoArrange is set to TRUE, the sequence of layers is by their weight specified via ILayerPosition::LayerWeight.  By default, this means that the layers are sorted by layer type - Annotation layers on top, followed by Point geometry layers, Polyline geometry layers, and at the bottom Polygon geometry layers.

See Also

IMapLayers Interface