import arcpy # Get WS current_Workspace = arcpy.env.workspace # Set the workspace environment to local file geodatabase arcpy.env.workspace = "C:/data/base.gdb" #set to SDE file arcpy.env.workspace = r"c:\data\base.sde"
Yes, but that doesn't work for my case... I am playing with a python addin on ArcMap open document, and if env.workspace is set before I won't have the default workspace...