Using the Applying Symbology from Layer tool appears to not capture a layer's table of contents visibility, label properties, feature scale range, or label scale range. I have many feature classes that are repeatedly used in numerous MXDs for which I need to change these properties. I need a process that is similar to said tool because I can run it in a fairly short script and apply it to all my MXDs.
I could use a script similar to that below, but would be required to (in addition to adding lines for the other properties) alter the feature class in ListLayers and the applicable properties many times in order to edit all the feature classes as needed.
mxdList = ['MXD1', 'MXD2', '...']
fcList = ['FC1', 'FC2', '...']
for doc in mxdList:
mxd = arcpy.mapping.MapDocument('Path\\' + doc)
for item in fcList:
for lyr in arcpy.mapping.ListLayers(mxd, item):
# lyr filename matches FC ToC name less extension
arcpy.ApplySymbologyFromLayer_management(lyr,
r'path\lyrFiles\/' + item + '.lyr')
if lyr.supports('VISIBLE'):
lyr.visible = False
# continue with other properties...
arcpy.RefreshTOC()
Is there a quick way to change these other properties for many MXDs? This would not be an issue if lyr files captured the properties of table of contents visibility, label properties, feature scale range, or label scale range.
[Edit]
I just found this link, which leads me to think ArcObjects in Python could be a solution to my question. This looks like a can of worms, however, for someone who is fairly new to the use of Python. Are there other alternatives besides extending code above, using ArcObjects, or dragging feature classes from one ArcMap window to another?
