Finding metadata about symbology in *.lyr file, data-source missing?

Finding metadata about symbology in *.lyr file, data-source missing?

I have this lyr file which have a data source I don't know where is. When I set a new data source, it's the lyr file with all the symbology that gets replaced with the default values from the data source, no the other way around.

Is there any way to get the coloring codes (which has to point to values in a table from the data source) in the lyr file?

Simplest approach would be to create another feature class with same field name of original feature class and apply the symbology to this new feature class.

If you don't know the field name, then you have to go Python (Arcpy)

From your snapshot it seems it is a "unique values" symbology which fortunate is exposed to arcpy.

Here is a snippet to print your symbology information:

import arcpy mxd = arcpy.mapping.MapDocument("current") lyr = arcpy.mapping.ListLayers(mxd, "layerName")[0] if lyr.symbologyType == "UNIQUE_VALUES": print lyr.symbology.valueField print lyr.symbology.classDescriptions print lyr.symbology.showOtherValues del mxd

you can copy & paste this code in ArcMap Python window

Watch the video: Basic and Advanced Symbol Selection in ArcGIS