kreuzrsk

Why DeleteField_management vs DeleteField?

Discussion created by kreuzrsk on Aug 15, 2011
Latest reply on Aug 15, 2011 by dhoneycutt-esristaff
I've been porting scripts from 9.2 to 10.0 and finding I have to add "_management" onto the end of many of the tools.  Why is that?  The scripts all worked in 9.2 and 9.3.  I'm sure the answer is going to be real simple. 

# 10.0 Code
# Load required toolboxes...
ARCGISHOME="C:/Program Files/ArcGIS/Desktop10.0/"
arcpy.AddToolbox(ARCGISHOME+"ArcToolbox/Toolboxes/Data Management Tools.tbx")
arcpy.AddToolbox(ARCGISHOME+"ArcToolbox/Toolboxes/Analysis Tools.tbx")
arcpy.DeleteField_management

vs

# 9.3 Code
# Load required toolboxes...
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx")
gp.deletefield

Outcomes