I have always ended up creating python scripts for automation against existing map or project files (for ArcGIS Pro). What I am wondering though is if python scripts using arcpy can be run against a temporary project file, as well as a temporary geodatabase file? Or, does there have to be a project file already created in order to utilize arcpy?
Thanks,
Mark
Solved! Go to Solution.
Correct, mostly. The ArcPy mapping modules were designed to work with map documents and project files, but there are examples of functions and classes within those modules that can be used without needing a map document or project file. Reviewing the module documentation should help answer questions about specific classes or functions.
The only ArcPy module that has any requirements for project files is mapping, arcpy.mp. Similar to ArcPy with ArcMap, ArcPy with ArcGIS Pro cannot create new project files. ArcPy can create new geodatabases. Overall, you do not need a temporary project file or temporary geodatabase to use ArcPy.
Ah ok, so if any of my scripts call the mapping side of things then I will need an actual project file to reference?
Correct, mostly. The ArcPy mapping modules were designed to work with map documents and project files, but there are examples of functions and classes within those modules that can be used without needing a map document or project file. Reviewing the module documentation should help answer questions about specific classes or functions.
Awesome.
Thanks for your help.