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 );
Product Availability
Available with ArcGIS Desktop. Requires ArcScan Extension.
Description
This method is called by the Select Connected Cells dialog.
[C#]
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 }