Hi folks,
I need to get a list of path names for feature classes in a gdb. The gdb is configured something like this:
Myfeatures.gdb
Feature 1 Dataset
I am having trouble getting right down to the FC for a path. I tried using the os.path.join function but it doesn't seem to like lists and an input.
This is what I have so far for code.
This is what I get for results from previous code:
Thanks.
Brett
I need to get a list of path names for feature classes in a gdb. The gdb is configured something like this:
Myfeatures.gdb
Feature 1 Dataset
fc1, fc2,fc3
Feature 2 Datasetfc1, fc2,fc3
Feature 3 Datasetfc1, fc2,fc3
etc. I am having trouble getting right down to the FC for a path. I tried using the os.path.join function but it doesn't seem to like lists and an input.
This is what I have so far for code.
Code:
import arcpy
import os
# Set the current workspace
gdbInput = "Q:\PIR\GIS\Brett\GDB Import Tool\Test Data\PIR_MR98copy.gdb"
gdbOutput = "Q:\PIR\GIS\Brett\GDB Import Tool\Test Data\EmptyGisDeliverables_v14.gdb"
arcpy.env.workspace = gdbInput
# Create list of datasets in input gdb
dsInput = arcpy.ListDatasets()
#print dsInput
#Create list of fc in ds
for ds in dsInput:
fcInput = arcpy.ListFeatureClasses(feature_dataset=ds)
print fcInput
Code:
[u'AppraisalPoint']
[u'BlockHubs', u'BlockPolygon']
[u'RoadLine', u'RoadCrossing', u'RoadNotes', u'RoadHubs']
[u'RiparianLine', u'Riparian_SMZ_Buffer', u'LakeWetland', u'LakeWetlandLine']
Brett