I am trying to write an automated mapping script to set new categories for a layer on each iteration, however I have encountered a problem.
If I understand it correctly may layer's symbologyType should be "UNIQUE_VALUES" to be able to modify the available categories. However my dataset has the symbologyType "OTHER".
Now I understand that symbologyType is a read-only attribute and I need to use UpdateLayer to create a new layer with the desired type, but where do I get a layer with the symbologyType "UNIQUE_VALUES" to do this?
All layers I have created have type other.
I am using ArcGIS Desktop 10.6.1
-
Please update your question to include a code snippet/what you've tried. I want to verify it's actually looking at the layer properties instead of a list for example. Also how were the layers created (arcpy, interatively in Desktop?)SMiller– SMiller2019年04月08日 20:28:45 +00:00Commented Apr 8, 2019 at 20:28
-
Possible duplicate of gis.stackexchange.com/questions/76427/…. It looks like you can create a lyr file that has the desired symbology type then apply that through updateLayer.SMiller– SMiller2019年04月08日 20:36:07 +00:00Commented Apr 8, 2019 at 20:36
-
smiller - The layers is a point layer that was created via geocoding a list of placenames. I am trying to use layer.symbolodyclassValues to add a specific list of values to display, but I can't because it's of a symbologyType "OTHER". Also it is not a duplicate, because to apply the methodology you linked I need to have a layer of a "UNIQUE_VALUES" type, which I do not and have not been able to produce.TheOGMalan– TheOGMalan2019年04月09日 11:00:05 +00:00Commented Apr 9, 2019 at 11:00
-
If I'm understanding the other question's reply - create manually in ArcMap a layer in your map with unique values as symbology, and save as layer on disk. Then that can be used in the update layer process.SMiller– SMiller2019年04月09日 11:38:37 +00:00Commented Apr 9, 2019 at 11:38