I'm using ArcGIS 10.0 on Windows 7 64 bit Ultimate.

I've noticed that sometimes ArcMap's geoprocessing tools as well as scripts seem to forget my setting in the mxd (confirmed via arcpy.env.workspace and arcpy.env.scratchWorkspace.

Is there any way to get ArcMap to start using my specified GDB?

I'm familiar with the document properties and how I can change the default GDB for a map. The issue I'm seeing happens after I've set it and its been using an alternate GDB for a while.

I find that at random times, ArcGIS suddenly decides it wants to go back to using the "default default" (which annoyingly can never be changed. I can close and reopen the document, set the alternate GDB I use as the default againvia the properties dialog, but it will not move back to using the alternative GDB. Toolbox and scripts keep placing output in the default ArcGIS location (documents/ArcGIS/default.gdb).

I was however playing around with this and found manually settings the arc.env.workspace in the Python window seemed to magically bring it back (even though I was setting the same value?). Executing the verbatim sa tool I had just ran put output into the correct GDB even though the dialog settings nor the environment settings had "changed".

Has anyone else come across this behavior?

  • Which OS & Version of ArcGIS are you using?
    – Mapperz
    Commented Mar 29, 2011 at 14:16
  • Are you running into this problem when running scripts inside ArcMap (from toolbox) or outside (from a Python IDE)? @ mapperz I believe arcpy is only in ArcGIS 10.
    – Nathanus
    Commented Mar 29, 2011 at 14:20
  • @panda To make sure I'm understanding you, when you run Geoprocessing tools and scripts inside ArcMap's UI, the workspaces are set to the wrong location?
    – Nathanus
    Commented Mar 30, 2011 at 18:32
  • 2
    I am running tools inside of ArcMap, both from the toolbox and the Python window. The workspaces are not set to the wrong values, its just every so often it just stops respecting the workspace and then starts outputting to the default location (in documents/ArcGis/default.gdb). I've found that reseting the workspace variables via the Python window seems to fix this. Commented Apr 2, 2011 at 15:39
  • 3
    re: "default default" can never be changed, please see and vote for Ability to permanently change the default location of the Default Geodatabase Commented Dec 8, 2011 at 22:15

1 Answer 1


This ArcGIS help for Setting the Default Geodatabase might be what you are looking for. I believe the "Default" is something that has to be set upon each map document's creation. After that, it should be accessible through the settings in the MXD. I'm away from my station so I can't confirm the exact toolbar rigamarole.

However it should be noted that your scratch Workspace is not always the same as your Workspace (they are different by default, if I recall). When using arcpy, environments are inherited if you use the arcpy.mapping class to create a reference to a given MXD (I think), but I know they can all be set through use of arcpy.env.

If you want to set your database/workspace specifically when using a Geoprocessing tool in ArcMap, you can :

  1. In ArcMap, click Geoprocessing > Environments. This opens the Environment Settings window.
  2. Expand the Workspace category and enter the path to the workspace.
    (See This page for more information.)
  • thanks - I'm familiar with these settings - the issue I'm seeing is in spite of. See my edit above - hopefully it makes it clearer. Commented Mar 29, 2011 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.