This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > ArcScan > ESRI.ArcGIS.ArcScan > Interfaces > IC > IConnectedCells Interface > IConnectedCells.LocateByDiagonalOfEnvelope Method (ArcObjects .NET 10.4 SDK) |
Generates the rectangles that represent all connected cells that meet the diagonal of envelope criteria.
[Visual Basic .NET] Public Sub LocateByDiagonalOfEnvelope ( _ ByVal Value As Double, _ ByVal lessThan As Boolean, _ ByVal equalTo As Boolean, _ ByVal Foreground As Boolean, _ ByVal bounds As IGeometry, _ ByVal callbackSel As INotifySelectionBlock, _ ByVal trackCancel As ITrackCancel, _ ByVal stepProgressor As IStepProgressor _ )
[C#] public void LocateByDiagonalOfEnvelope ( double Value, bool lessThan, bool equalTo, bool Foreground, IGeometry bounds, INotifySelectionBlock callbackSel, ITrackCancel trackCancel, IStepProgressor stepProgressor );
This method is called by the Select Connected Cells dialog.
The following code shows an example of this method in C#.
//You can get app from ICommand :: OnCreate() hook parameter
public void LocateByDiag()
{
IConnectedCells connectedCells=m_app.FindExtensionByName("ESRI ArcScan Tools") as IConnectedCells;
IMxDocument mxDoc=m_app.Document as IMxDocument;
INotifySelectionBlock foundBlock=new FoundBlock();
connectedCells.LocateByDiagonalOfEnvelope(1000, true, true, true, mxDoc.ActiveView.Extent, foundBlock, null, null);
}
Also create a new class (FoundBlock) with the following code.
public class FoundBlock : ESRI.ArcGIS.ArcScan.INotifySelectionBlock
{
public FoundBlock()
{
}
#region INotifySelectionBlock Members
void ESRI.ArcGIS.ArcScan.INotifySelectionBlock.SelectionBlock(ref ESRI.ArcGIS.Display.tagRECT rectangle, object block, ESRI.ArcGIS.esriSystem.ITrackCancel cancel)
{
System.Diagnostics.Debug.Print("Found block");
}
#endregion
}
See Also
IConnectedCells Interface