Cool tool. I can explicitly run analyze, but I only want to run from the dataset level, and the only option is to itemize every fc, so if I have 100 feature datasets with 20 feature classes in most of the fd, that is a lot of selecting, especially at the last minute that I don't want to analyze 1 specific FD with its 40 sub layers. This change would need to be un selected manually. Seems like I should have the capability to just analyze at the FD level, too. Do like the idea though, at least 1 script will need to be reworked.
# set the workspace environment arcpy.env.workspace=workspace # NOTE: Analyze Datasets can accept a Python list of datasets. # Get a list of all the datasets the user has access to. # First, get all the stand alone tables, feature classes and rasters. dataList = arcpy.ListTables() + arcpy.ListFeatureClasses() + arcpy.ListRasters() # Next, for feature datasets get all of the datasets and featureclasses # from the list and add them to the master list. for dataset in arcpy.ListDatasets("","Feature"): arcpy.env.workspace = os.path.join(workspace,dataset) dataList += arcpy.ListFeatureClasses() + arcpy.ListDatasets() # reset the workspace arcpy.env.workspace = workspace
# set the workspace environment arcpy.env.workspace=workspace # The name of your feature dataset FDS = 'NameOfYourFDS' # NOTE: Analyze Datasets can accept a Python list of datasets. # Next, for feature datasets get all of the datasets and featureclasses # from the list and add them to the master list. for dataset in arcpy.ListDatasets(FDS,"Feature"): arcpy.env.workspace = os.path.join(workspace,dataset) dataList += arcpy.ListFeatureClasses() + arcpy.ListDatasets() # reset the workspace arcpy.env.workspace = workspace
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.