This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > ArcScan > ESRI.ArcGIS.ArcScan > Interfaces > IC > IConnectedCells Interface > IConnectedCells.QueryArea Method (ArcObjects .NET 10.5 SDK) |
Generates the area of the connected cells at the given point.
[Visual Basic .NET] Public Sub QueryArea ( _ ByVal position As IPoint, _ ByRef Foreground As Boolean, _ ByRef Area As Integer _ )
[C#] public void QueryArea ( IPoint position, ref bool Foreground, ref int Area );
This method is called by the Find Connected Cell Area tool on the ArcScan toolbar.
The following code shows an example of this method in C#.
//You can get app from ICommand :: OnCreate() hook parameter
public void QueryArea()
{
IConnectedCells connectedCells=app.FindExtensionByName("ESRI ArcScan Tools") as IConnectedCells;
ESRI.ArcGIS.Geometry.IPoint currentPoint=new ESRI.ArcGIS.Geometry.Point();
currentPoint.PutCoords(39.2, 37.4);
bool isForeground=false;
int area=0;
connectedCells.QueryArea(currentPoint, ref isForeground, ref area);
}