When putting a tool in a python script, I've always added a tool by putting the name of the tool, followed by an underscore and then the toolbox name like this:
A co-worker found the following in the ArcGIS help file. What, if any, is the advantage of doing it this way?
I don't see the point?
Also, I see this quite a bit:
...isn't it easier to just to this:
Maybe there's a legit reason to write extra code?
Code:
import arcpy
arcpy.SimplifyLine_cartography(mergedFeatures, simplifiedFeatures, "BEND_SIMPLIFY", 100, "RESOLVE_ERRORS", "KEEP_COLLAPSED_POINTS", "CHECK")Code:
import arcpy.cartography as CA
CA.SimplifyLine(mergedFeatures, simplifiedFeatures, "BEND_SIMPLIFY", 100, "RESOLVE_ERRORS", "KEEP_COLLAPSED_POINTS", "CHECK")Also, I see this quite a bit:
Code:
import arcpy
from arcpy import env
env.workspace = "C:/temp"Code:
import arcpy
arcpy.env.workspace = "C:/temp"Maybe there's a legit reason to write extra code?