Select to view content in your preferred language

What is the difference between using the arcpy management module (eg. arcpy.management.CalculateField) and the arcpy.CalculateField_management method?

1564
1
Jump to solution
11-16-2021 03:27 AM
brianlin
Emerging Contributor

The documentation for the arcpy modules under ArcGIS Pro are all using the arcpy.management module https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm


compared to the ArcMap documentation where the methods are sitting in arcpy.  https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/calculate-field.htm

There appears to be no difference in performance between the two in ArcGIS Pro/arcpy 2.8.

So I was curious if anyone has any insight between the two?

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

They are the same

In the new toolbox structure (since 2.8) the calculate field tool is located in

C:\....YourInstallFolder...\Resources\ArcToolBox\toolboxes\Data Management Tools.tbx\CalculateField.tool

"management" is the alias for Data Management in arctoolbox

and the script is located in

C:\....YourInstallFolder...\Resources\ArcPy\arcpy\management.py

You can examine at your leisure the association between the two incarnations of methods of referencing tools in the script

C:\....YourInstallFolder...\Resources\ArcPy\arcpy\toolbox.py

Examining the scripts in various locations you can find out how arcpy and tools work together

PS  I moved this to Python Questions since it isn't associated with the python api


... sort of retired...

View solution in original post

Tags (2)
1 Reply
DanPatterson
MVP Esteemed Contributor

They are the same

In the new toolbox structure (since 2.8) the calculate field tool is located in

C:\....YourInstallFolder...\Resources\ArcToolBox\toolboxes\Data Management Tools.tbx\CalculateField.tool

"management" is the alias for Data Management in arctoolbox

and the script is located in

C:\....YourInstallFolder...\Resources\ArcPy\arcpy\management.py

You can examine at your leisure the association between the two incarnations of methods of referencing tools in the script

C:\....YourInstallFolder...\Resources\ArcPy\arcpy\toolbox.py

Examining the scripts in various locations you can find out how arcpy and tools work together

PS  I moved this to Python Questions since it isn't associated with the python api


... sort of retired...
Tags (2)