Select to view content in your preferred language

Can arcpy be used without an actual project file?

1308
4
Jump to solution
10-24-2018 04:14 AM
MarkJones7
Regular Contributor

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

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

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.

View solution in original post

4 Replies
JoshuaBixby
MVP Esteemed Contributor

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.

0 Kudos
MarkJones7
Regular Contributor

Ah ok, so if any of my scripts call the mapping side of things then I will need an actual project file to reference?

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

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.

MarkJones7
Regular Contributor

Awesome.

Thanks for your help.

0 Kudos