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.
Exploring Deepfakes by Bryan Lyon and Matt Tora(7327)
Robo-Advisor with Python by Aki Ranin(7230)
Offensive Shellcode from Scratch by Rishalin Pillay(5903)
Ego Is the Enemy by Ryan Holiday(4881)
Microsoft 365 and SharePoint Online Cookbook by Gaurav Mahajan Sudeep Ghatak Nate Chamberlain Scott Brewster(4608)
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(4412)
Python for ArcGIS Pro by Silas Toms Bill Parker(3978)
Elevating React Web Development with Gatsby by Samuel Larsen-Disney(3681)
Machine Learning at Scale with H2O by Gregory Keys | David Whiting(3395)
Learning C# by Developing Games with Unity 2021 by Harrison Ferrone(3249)
Speed Up Your Python with Rust by Maxwell Flitton(3208)
Liar's Poker by Michael Lewis(3191)
OPNsense Beginner to Professional by Julio Cesar Bueno de Camargo(3177)
Extreme DAX by Michiel Rozema & Henk Vlootman(3152)
Agile Security Operations by Hinne Hettema(3105)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic and Jasmin Redzepagic(3095)
Essential Cryptography for JavaScript Developers by Alessandro Segala(3064)
Cryptography Algorithms by Massimo Bertaccini(2981)
AI-Powered Commerce by Andy Pandharikar & Frederik Bussler(2966)
