Skip to content

Instantly share code, notes, and snippets.

@AlexArcPy
Created March 1, 2016 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexArcPy/91f39f3d743a4f236818 to your computer and use it in GitHub Desktop.
Save AlexArcPy/91f39f3d743a4f236818 to your computer and use it in GitHub Desktop.
Accessing properties of a geodatabase
import arcpy
path = r"C:\ArcTutor\Editing\Zion.gdb"
#obtaining individual properties
release = arcpy.Describe(path).release
workspaceType = arcpy.Describe(path).workspaceType
workspaceFactoryProgID = arcpy.Describe(path).workspaceFactoryProgID
#obtaining a dictionary of properties
gdb_attributes_dict = {'release': arcpy.Describe(path).release,
'workspaceType': arcpy.Describe(path).workspaceType,
'workspaceFactoryProgID': arcpy.Describe(path).workspaceFactoryProgID}
print gdb_attributes_dict['workspaceFactoryProgID']
# >>> esriDataSourcesGDB.FileGDBWorkspaceFactory.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment