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


IFeatureLayerDefinition2.CreateSelectionLayer Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

IFeatureLayerDefinition2.CreateSelectionLayer Method

Creates a new feature layer from the existing layer based on the current selection and the specified query expression.

[Visual Basic .NET]
Public Function CreateSelectionLayer ( _
    ByVal LayerName As String, _
    ByVal useCurrentSelection As Boolean, _
    ByVal joinTableNames As String, _
    ByVal Expression As String _
) As IFeatureLayer
[C#]
public IFeatureLayer CreateSelectionLayer (
    string LayerName,
    bool useCurrentSelection,
    string joinTableNames,
    string Expression
);
[C++]
HRESULT CreateSelectionLayer(
  BSTR LayerName,
  VARIANT_BOOL useCurrentSelection,
  BSTR joinTableNames,
  BSTR Expression,
  IFeatureLayer** Layer
);
[C++]

Parameters LayerName [in] LayerName is a parameter of type BSTR useCurrentSelection [in] useCurrentSelection is a parameter of type VARIANT_BOOL joinTableNames [in] joinTableNames is a parameter of type BSTR Expression [in] Expression is a parameter of type BSTR Layer [out, retval]
Layer is a parameter of type IFeatureLayer

Product Availability

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

See Also

IFeatureLayerDefinition2 Interface