AnsweredAssumed Answered

Path Names

Question asked by Bauger on Jun 17, 2014
Latest reply on Jun 17, 2014 by iamurray
Hi folks,

I need to get a list of path names for feature classes in a gdb. The gdb is configured something like this:

Feature 1 Dataset
[INDENT]fc1, fc2,fc3 [/INDENT]
Feature 2 Dataset
[INDENT]fc1, fc2,fc3 [/INDENT]
Feature 3 Dataset
[INDENT]fc1, fc2,fc3 [/INDENT]


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.

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

This is what I get for results from previous 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']