Tuesday, 26 May 2015

arcpy - Programatically setting default Geodatabase and Workspaces for map document?



I have a QC process that has a bunch of models that need to be sequentially run, and then the results manually inspected between each model.


I know how to manually set the default GDB for the Map Document (File-->Map Document Properties-->Default Geodatabase).


I also know how to manually set the default Geoprocessing Workspaces (Geoprocessing-->Environments-->Workspace).


I already have a "setup script" that generate a GDB, Feature Datasets, define the spatial reference, etc, and I would like to be able to integrate these steps into the setup procedure as well.



Can these settings be automatically set? For example, I have tried arcpy.env.workspace, but that only appears to work within a script, not setting it at the "application" level. Is this possible?


I know it seems like a small thing, but I have many "areas of interest" that we have to look at, and each one gets placed in its own MXD and GDB (so yes, I could do it by hand... over & over again).




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...