Reinitialize attribute table

This tool can be used to remove an existing (possibly corrupted) attribute table (dbf file) associated with a vector Shapefile and replace it with a simple table containing only a single Feature ID (FID) attribute that describes the record number.

See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.shp"
args = [inputFile]
pluginHost.runPlugin("ReinitializeAttributeTable", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "coutries.shp"
String[] args = [inputFile]
pluginHost.runPlugin("ReinitializeAttributeTable", args, False)

Credits: