[Reprinted] Method for deleting elements in batches
Http://www.gissky.net/blog/user1/yumao/16139.html
Yesterday I asked a person how to delete all the elements in the element class at one time and helped him find out the specific methods (such as deleteall removeall and other direct methods ), however, you can change your thinking from other ideas. Therefore, a method is found in the itable interface:Itable: deletesearchedrows
In fact, this method is used to delete the records in the selected table. The work und is to delete all elements so that all record elements can be searched, you can directly Delete this method.
experiment ---- Yes, no problem
Code ):
dim pmxd as imxdocument
set pmxd = thisdocument
dim plyr as ifeaturelayer
set plyr = pmxd. focusmap. layer (0)
dim ptable as itable
set ptable = plyr. featureclass ''qi
dim pqueryf as iqueryfilter'' defines the query condition object.
set pqueryf = new queryfilter, indicates to query all
ptable. deletesearchedrows pqueryf'' can be executed to delete records.