Posted on 2008-08-28 11:06
黎民 阅读(363)
评论(0) 编辑 收藏 所属分类:
GIS原理
Private Sub delSelFeatures()
Dim pMxdoc As IMxDocument
Dim pFl As IFeatureLayer
Set pMxdoc = ThisDocument
Set pFl = pMxdoc.SelectedLayer
Dim pFeatureCursor As IFeatureCursor
Dim pFeatureSel As IFeatureSelection
Set pFeatureSel = pFl
pFeatureSel.SelectionSet.Search Nothing, False, pFeatureCursor
Dim pFeature As IFeature
Set pFeature = pFeatureCursor.NextFeature
Do While Not pFeature Is Nothing
pFeature.Delete
Set pFeature = pFeatureCursor.NextFeature
Loop
End Sub