arcgis删除数据代码

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

你可能感兴趣的:(arcgis删除数据代码)