1

I'm trying to change the default symbol (font, halo etc) for labels of a layer that I am adding to an mxd. Below is what I have so far, but the template layer font style didn't show up in the map. arcpy.mapping.updateLayer didn't work either.

citySym = r"C:\CitySymboly.lyr"
cityFc  = r"C:\\City"
cityMap = arcpy.mapping.Layer(cityFc)
#
#......other code not relevant
#
cityname = cityFc + subsetname
addCity = arcpy.mapping.Layer(cityname)
cityLayer=arcpy.mapping.AddLayer(df, addCity, "TOP")
inputCity = arcpy.mapping.ListLayers(mapdoc,cityLayer,df)[0]
#arcpy.mapping.UpdateLayer(df, inputCity, citySym, True)
arcpy.ApplySymbologyFromLayer_management (inputCity, citySym)
inputCity.showLabels = True

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.