ArcPy – Refreshing Symbology Values in ArcGIS Pro Project

arcgis-proarcpysymbology

I have a Python script (run in an IDE, so not in ArcGIS Pro) that fixes broken data sources in .aprx files. After fixing these, I'd like the script to refresh the symbology values to accommodate the updated dataset. It is very easy to do in Pro (Symbology > Classes tab > More > Refresh Values) & I'm struggling to see why this feature wouldn't be in ArcPy.

After extensive searching, I can only find reference to the Apply Symbology From Layer tool, which I don't want to do as this would mean the value bands are static & do not represent the updated dataset.

Is there a Refresh Values function in ArcPy and, if not, is there a pragmatic workaround?

Best Answer

I agree I'm not aware of any equivalent refresh of values exposed by arcpy. You could try emulating this by programmatically rebuilding the class breaks and setting the symbology through the renderer, sample code can be found of the Class Break help page.

Related Question