Solved! Go to Solution.
analyzeDatasets = [] for dataset in arcpy.ListDatasets("*"): for featureClass in arcpy.ListFeatureClasses("*", "", dataset): analyzeDatasets.append(featureClass) for featureClass in arcpy.ListFeatureClasses("*"): analyzeDatasets.append(featureClass) arcpy.AnalyzeDatasets_management(env.workspace,"NO_SYSTEM",analyzeDatasets,"ANALYZE_BASE","ANALYZE_DELTA","ANALYZE_ARCHIVE")
analyzeDatasets = [] for dataset in arcpy.ListDatasets("*"): for featureClass in arcpy.ListFeatureClasses("*", "", dataset): analyzeDatasets.append(featureClass) for featureClass in arcpy.ListFeatureClasses("*"): analyzeDatasets.append(featureClass) arcpy.AnalyzeDatasets_management(env.workspace,"NO_SYSTEM",analyzeDatasets,"ANALYZE_BASE","ANALYZE_DELTA","ANALYZE_ARCHIVE")