AnsweredAssumed Answered

How do I remove layers with broken data sources?

Question asked by epa4416 on Sep 5, 2014
Latest reply on Sep 5, 2014 by iamurray

I need to scroll through an mxd and remove any layers that have broken data sources.

I have found


     brknList = arcpy.mapping.ListBrokenDataSources(inMXD)




for lyr in arcpy.mapping.ListLayers(mxd, "*",df):

arcpy.mapping.RemoveLayer(df, lyr)


both work well, but not together.

Any suggestions?