Sub Select
Dim pFeatSel As IFeatureSelection
Dim pQF As IQueryFilter
Set pFeatSel = FindLayer("Название слоя")
' set up query filter with where clause
Set pQF = New QueryFilter
pQF.WhereClause = "SQL запрос типа 'AREA > 1000' "
' perform selection
pFeatSel.SelectFeatures pQF, esriSelectionResultNew, False
pFeatSel.SelectionChanged
MapControl1.ActiveView.PartialRefresh esriViewGeography, Nothing, Nothing
MapControl1.Refresh
end sub
Public Function FindLayer(sName As String) As ILayer
Set FindLayer = Nothing
If (MapControl1.ActiveView.FocusMap Is Nothing) Then
MsgBox "Layer not found: " + sName
Exit Function
End If
Dim pUID As UID
Set pUID = Nothing
Dim pLayers As IEnumLayer
Set pLayers = MapControl1.ActiveView.FocusMap.Layers(pUID, True)
Dim pLayer As ILayer
Set pLayer = pLayers.Next
While (Not pLayer Is Nothing)
If (pLayer.Name = sName) Then
Set FindLayer = pLayer
Exit Function
End If
Set pLayer = pLayers.Next
Wend
Exit Function
End Function