Created
March 1, 2016 16:27
-
-
Save AlexArcPy/91f39f3d743a4f236818 to your computer and use it in GitHub Desktop.
Accessing properties of a geodatabase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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