Hi All
Just a clarification question as I could not find any reference document.
in ArcGIS Pro Python window, we have a command "arcpy.management.AddField()" and "arcpy.AddField_management()"
I just want to know what the difference in both commands and any recommendation on usage is.
in ArcGIS Pro Notebook, I get the following Help.
Signature: arcpy.management.AddField( in_table=None, field_name=None, field_type=None, field_precision=None, field_scale=None, field_length=None, field_alias=None, field_is_nullable=None, field_is_required=None, field_domain=None,
Docstring:
AddField_management(in_table, field_name, field_type, {field_precision}, {field_scale}, {field_length}, {field_alias}, {field_is_nullable}, {field_is_required}, {field_domain})
Hi,
I'm fairly sure they are functionally the same, I think with the transition from ArcMap to ArcGIS Pro ESRI tidied up the ArcPy functions to be in the format arcpy.mapping, arcpy.management etc. but the historic versions are still around presumably for backwards compatibility? If you look at some of the older geoprocessing documentation for ArcMap you will see references to the older format of arcpy.AddField_management (see here https://desktop.arcgis.com/en/arcmap/10.6/tools/data-management-toolbox/add-field.htm). So I'd recommend using arcpy.management.AddField(), and sticking with whatever is referenced in the most recent ArcGIS Pro documentation for python snippets.
@JoshuaSharp-Heward Thanks for clarification