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


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

IMxdServerQuery.QueryByLayer Method

Returns a feature cursor for the specified layer based on the input parameters for the purpose of selecting based on another layer.

[Visual Basic .NET]
Public Function QueryByLayer ( _
    ByVal MapName As String, _
    ByVal targetLayerID As Integer, _
    ByVal selectionLayerID As Integer, _
    ByVal selectionMethod As esriLayerSelectionMethod, _
    ByVal useSelected As Boolean, _
    ByVal BufferDistance As Double, _
    ByVal bufferDistanceUnits As esriUnits _
) As IFeatureCursor
[C#]
public IFeatureCursor QueryByLayer (
    string MapName,
    int targetLayerID,
    int selectionLayerID,
    esriLayerSelectionMethod selectionMethod,
    bool useSelected,
    double BufferDistance,
    esriUnits bufferDistanceUnits
);
[C++]
HRESULT QueryByLayer(
  BSTR MapName,
  long targetLayerID,
  long selectionLayerID,
  esriLayerSelectionMethod selectionMethod,
  VARIANT_BOOL useSelected,
  double BufferDistance,
  esriUnits bufferDistanceUnits
);
[C++]
Parameters
MapName [in]

MapName is a parameter of type BSTR targetLayerID [in]
targetLayerID is a parameter of type long selectionLayerID [in]
selectionLayerID is a parameter of type long selectionMethod [in]
selectionMethod is a parameter of type esriLayerSelectionMethod useSelected [in]
useSelected is a parameter of type bool BufferDistance [in]
BufferDistance is a parameter of type double bufferDistanceUnits [in]
bufferDistanceUnits is a parameter of type esriUnits

Product Availability

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

See Also

IMxdServerQuery Interface