Programming ArcGIS Pro with Python (2nd Edition) by Pimpler Eric
Author:Pimpler, Eric [Pimpler, Eric]
Language: eng
Format: epub
Publisher: Technics Publications
Published: 2021-04-29T16:00:00+00:00
Set the fields property on the UniqueValuesRenderer to the Condition field and apply the symbology to the layer.
import arcpy.mp as map
try:
aprx = map.ArcGISProject(“CURRENT”)
for m in aprx.listMaps(“Streets and Railroads”):
for lyr in m.listLayers(“Street_Centerlines”):
if lyr.isFeatureLayer:
sym = lyr.symbology
sym.updateRenderer(‘UniqueValueRenderer’)
sym.renderer.fields = [“Condition”]
lyr.symbology = sym
except Exception as e:
print(“Error: “ + e.args[0])
You can check your code against a solution file found at c:\Student\ProgrammingPro\Solutions\Scripts\UniqueValueRenderer.py
Load the code into the ArcGIS Pro Python window and run it. The Street_Centerlines layer will be updated as seen in the screenshot below.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4129)
Ego Is the Enemy by Ryan Holiday(3991)
Offensive Shellcode from Scratch by Rishalin Pillay(3656)
Exploring Deepfakes by Bryan Lyon and Matt Tora(3240)
Robo-Advisor with Python by Aki Ranin(3013)
Learning C# by Developing Games with Unity 2021 by Harrison Ferrone(2864)
Speed Up Your Python with Rust by Maxwell Flitton(2842)
Liar's Poker by Michael Lewis(2810)
Agile Security Operations by Hinne Hettema(2798)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic and Jasmin Redzepagic(2797)
OPNsense Beginner to Professional by Julio Cesar Bueno de Camargo(2797)
Extreme DAX by Michiel Rozema & Henk Vlootman(2789)
Essential Cryptography for JavaScript Developers by Alessandro Segala(2736)
Elevating React Web Development with Gatsby by Samuel Larsen-Disney(2725)
AI-Powered Commerce by Andy Pandharikar & Frederik Bussler(2640)
Python for ArcGIS Pro by Silas Toms Bill Parker(2638)
Cryptography Algorithms by Massimo Bertaccini(2626)
Incident Response Techniques for Ransomware Attacks by Oleg Skulkin(2624)
Distributed .NET with Microsoft Orleans by Bhupesh Guptha Muthiyalu Suneel Kumar Kunani(2623)