Hello,
I'm migrating a Ptyhon script for ArcGIS 10.x to ArcGIS Pro 2.9. There is one 10.x code that I can't find equivalent to Pro.
Spoiler# ArcGIS 10.x
import arcpy
layer = ...
if layer.symbologyType == "RASTER_CLASSIFIED":
layer.symbology.excludedValues = '0'
where layer is a raster. What I want to do is not to give a color to raster cells whose value is 0.
If I open an ArcGIS Pro project, I can do this by going to the Symbology pane and Advanced symbology options. Then, enter "0" to "Data exclusion" box.
Does anyone know how to do this in a Python script for ArcGIS Pro 2.9 (or 3.x; I have both versions)?
Thanks,