I am working on Raster cleanup tool and using below but is the output rectangle or block?
Private Sub LocateByDiag()
Dim pMxDoc As IMxDocument
Dim pConCell As IConnectedCells
Dim pFoundBlock As INotifySelectionBlock
Set pConCell = Application.FindExtensionByName("ESRI ArcScan Tools")
Set pMxDoc = ThisDocument
Set pFoundBlock = New FoundBlock
pConCell.LocateByDiagonalOfEnvelope 100, True, True, True, pMxDoc.ActiveView.Extent, pFoundBlock, Nothing, Nothing
End Sub
Place the following code into a class and name it FoundBlock Implements INotifySelectionBlock
Private Sub INotifySelectionBlock_SelectionBlock(rectangle As tagRECT, ByVal block As Variant, ByVal cancel As ITrackCancel)
Debug.Print "Found block"
End Sub