arcgis删除数据代码

Posted on 2008-08-28 11:06 黎民 阅读(362) 评论(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

只有注册用户登录后才能发表评论。


网站导航:
 

posts - 57, comments - 3, trackbacks - 0, articles - 1

Copyright © 黎民