1stAmerican

ArcPy: Performance using "Current" vs. mxdPath - Is there a difference??

Discussion created by 1stAmerican on Dec 13, 2010
Latest reply on Dec 14, 2010 by jbarrette-esristaff
I want to decrease processing time for Map Automation using ArcPy.
I just read in previous post titled "ListLayoutElements for loop issue" Jeff's response indicating the following:
You will see a difference between running this as a stand-alone script vs. running in the Python Window using CURRENT because the implementations are different.
Here is a very brief explanation: with CURRENT the code is acting directly on the map document in the application and all objects are directly accessible. As a stand alone script, the code is acting against a map document that does not exist in an application but rather in a "fictitious" window that needs to be activated each time objects called.
This said, will my scripts run faster if they use "Current" vs. accessing an mxdPath?
If so, I see benefits in running the script directly from the mxd itself.
Is this correct?

Outcomes