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


ISelectionLayerDefinition.CreateSelectionLayer Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IS > ISelectionLayerDefinition Interface > ISelectionLayerDefinition.CreateSelectionLayer Method
ArcGIS Developer Help

ISelectionLayerDefinition.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
);
[C++]
Parameters
LayerName [in]

LayerName is a parameter of type BSTR useCurrentSelection [in]
useCurrentSelection is a parameter of type bool joinTableNames [in]
joinTableNames is a parameter of type BSTR Expression [in]
Expression is a parameter of type BSTR

Product Availability

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

See Also

ISelectionLayerDefinition Interface