read file GDB using python

15603
3
Jump to solution
09-14-2014 10:56 AM
BertKraan1
Occasional Contributor III

Hi, how do I read geodatabase content using python? Creating a file geodatabase is not a problem but after that, how can I acces the file GDB using python and -for example- lists its content

tia, Bert

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

Do you mean like ListFeatureClasses ?  There are many more here if this is what you mean

View solution in original post

3 Replies
DanPatterson_Retired
MVP Emeritus

Do you mean like ListFeatureClasses ?  There are many more here if this is what you mean

BertKraan1
Occasional Contributor III

That's exactly what I mean, thanks Dan, and thank you Matthew for your code example.

0 Kudos
MatthewLewis
Occasional Contributor

just adding to the first reply

import arcpy

from arcpy import env

env.workspace = "C:/mygdb.gdb"

fclist = arcpy.ListFeatureClasses()

for fc in fclist:

     ## Add Code here

     print fc