'图层查找函数
'对在图层列表中显示的选择的图层进行查询显示。
Private Sub QueryByClass(ByRef operator As esriSelectionResultEnum)
Dim pFeatureLayer As IGeoFeatureLayer
Dim j As Integer
Dim pFeatureselection As IFeatureSelection
Dim pActiveView As IActiveView
On Error GoTo ErrorHandler
pActiveView = m_pMap
pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, Nothing, Nothing)
For j = 0 To lstClass.Items.Count - 1
If (lstClass.GetSelected(j)) Then
word="vbup1037"”
If (FoundLayer(VB6.GetItemString(lstClass, j), pFeatureLayer)) Then
pFeatureselection = pFeatureLayer
If (pFeatureLayer.Selectable) Then
pFeatureselection.SelectFeatures(Nothing, operator, False)
Else
If (operator = esriSelectionResultEnum.esriSelectionResultNew) Then pFeatureselection.Clear()
End If
End If
Else
word="vbup1037"”
If (FoundLayer(VB6.GetItemString(lstClass, j), pFeatureLayer)) Then
pFeatureselection = pFeatureLayer
If ((operator = esriSelectionResultEnum.esriSelectionResultNew) Or (operator = esriSelectionResultEnum.esriSelectionResultAnd)) Then pFeatureselection.Clear()
End If
End If
Next j
pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, Nothing, Nothing)
'm_pApp.StatusBar.message(0) = "被选择的特征要素数目: " & CStr(m_pMap.SelectionCount)
RefreshSelectButtons()
Exit Sub