set symbology by lyr file VERY slow

1578
1
03-04-2016 06:53 AM
JimCousins
MVP Regular Contributor

I have over 200 ascii files, and a .lyr file for the classification I wish to set. I have used the following in the python window, but it is taking HOURS to cycle through. There must be a better way to do this, can anyone point me to a quicker / better solution?

>>> import arcpy

>>> mxd = arcpy.mapping.MapDocument("CURRENT")

>>> df = arcpy.mapping.ListDataFrames(mxd, "*") [0]

>>> lyrSource = r"Z:\1393_HANFORD_FY2016\062_FY2016_100_Areas_PT_Rpt\GIS\CrVI_ASC.lyr"

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

...     arcpy.ApplySymbologyFromLayer_management(lyr,lyrSource)

Best Regards,

Jim Cousins

0 Kudos
1 Reply
JimCousins
MVP Regular Contributor

Follow up: The python window shows:

Succeeded at Fri Mar 04 10:..... (Elapsed Time 0.06 seconds)

but this takes many minutes to pop up.

Evidently the process itself is quite fast, but the sequential process is glacially slow.

0 Kudos