I have hundreds of .gml datasets containing multipatch feature classes that I want to export as shapefiles to a folder. The problem is that none of the List Functions can read them in .gml datasets. Is there a way to select them from multiple folders and export them using Python?

Here is the code that I have been using.

import arcpy  
import os  

def fcs_in_workspace(workspace,fcc):  
  arcpy.env.workspace = workspace  
  for fc in arcpy.ListFeatureClasses('',fcc):  
    yield os.path.join(workspace, fc)  
  for ws in arcpy.ListWorkspaces():  
    for fc in fcs_in_workspace(os.path.join(workspace, ws)):  
        yield fc  

for fc in fcs_in_workspace(sample.gdb','Multipatch'):
print fcList

Sample image

  • arcpy.ListFeatureClasses reads a file geodatabase, not GML. – Vince Jan 3 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.