I am accessing layers in an mxd programatically and also accessing the layer properties using the Describe function
lyr =arcpy.mapping.ListLayers(mxd) # gets me the list of layers in mxd desc= arcpy.Describe(lyr[8]) #returns the properties of the layers This last step fails at one of the layer "Annotation Class 1" as the layer has white space characters or a probable keyword ( I suppose) in it showing me the following error:
It is impossible for me to go and manually change all mxd layer names with whitespace, please help, thanks
أكثر...
lyr =arcpy.mapping.ListLayers(mxd) # gets me the list of layers in mxd desc= arcpy.Describe(lyr[8]) #returns the properties of the layers This last step fails at one of the layer "Annotation Class 1" as the layer has white space characters or a probable keyword ( I suppose) in it showing me the following error:
RuntimeError: Object: Describe input value is not valid type
How do I handle that?
It is impossible for me to go and manually change all mxd layer names with whitespace, please help, thanks
أكثر...