tivelp

Adding all feature classes in a dataset to a topology

Discussion created by tivelp on Jun 17, 2011
Latest reply on Jun 22, 2011 by tivelp
I'm trying to create a tool that will make an empty topology and will also add all feature classes in that dataset to that topology. The first part of my script that creates the topology is working, but I can't figure out how to add all of my feature classes to the script. I'm very new to programming and python so my code might be terrible and way off, but this is what I've done that I can't get to work. Am I close? Thanks,

import arcpy
import arceditor

Dataset = arcpy.GetParameterAsText (0)
fcs = arcpy.ListFeatureClasses()

arcpy.CreateTopology_management(Dataset, "EmptyTopology", "0.000005")

for fc in fcs:

                arcpy.AddFeatureClassToTopology_management("EmptyTopology", fc, "5", "5")

Outcomes