AnsweredAssumed Answered

RuntimeError When Applying Symbology from Layer

Question asked by vshah6 on Aug 13, 2018
Latest reply on Aug 13, 2018 by vshah6

I am currently working on a tool that does majority of my workflow when it comes to creating an assets map every month. One of the required things in this map is the use of custom symbology. The tool I am working on applies the custom symbology based on the status of the asset. Here is what my code looks like currently:

 

import arcpy
import os
import arcpy.mapping as map
from arcpy import env
import datetime

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

awardedNodes = arcpy.mapping.ListLayers(mxd, r'Outdoor Assets\Awarded\Node Locations')
awardedFiber = arcpy.mapping.ListLayers(mxd, r'Outdoor Assets\Awarded\Fiber Segments')

inProcessNodes = arcpy.mapping.ListLayers(mxd, r'Outdoor Assets\In-Process\Node Locations')
inProcessFiber = arcpy.mapping.ListLayers(mxd, r'Outdoor Assets\In-Process\Fiber Segments')

nodeSymbologyAll = r"\\user\Desktop\Symbology\Nodes.lyr"
fiberSymbologyAll = r"\\user\Desktop\Symbology\Fiber.lyr"

arcpy.ApplySymbologyFromLayer_management (awardedNodes, nodeSymbologyAll)
arcpy.ApplySymbologyFromLayer_management (awardedFiber, fiberSymbologyAll)

arcpy.ApplySymbologyFromLayer_management (inProcessNodes, nodeSymbologyAll)
arcpy.ApplySymbologyFromLayer_management (inProcessFiber, fiberSymbologyAll)

 

With this, I get the error message: RuntimeError: Object: Error in executing tool.

 

Any ideas on how to fix this?

Outcomes