This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > ArcScan > ESRI.ArcGIS.ArcScan > Interfaces > IC > IConnectedCells Interface > IConnectedCells.QueryDiagonalOfEnvelope Method (ArcObjects .NET 10.4 SDK) |
Generates the value of the diagonal of the envelope of the connected cells at the given point.
[Visual Basic .NET] Public Sub QueryDiagonalOfEnvelope ( _ ByVal position As IPoint, _ ByRef Foreground As Boolean, _ ByRef Value As Double _ )
[C#] public void QueryDiagonalOfEnvelope ( IPoint position, ref bool Foreground, ref double Value );
This method is called by the Find Diagonal Of The Envelope of Connected Cells 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 QueryDiag()
{
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;
double area=0;
connectedCells.QueryDiagonalOfEnvelope(currentPoint, ref isForeground, ref area);
System.Diagnostics.Debug.Print("Is Foreground=" + isForeground);
System.Diagnostics.Debug.Print("Area=" + area);
}