Alter Pro Rotation Angle with Python

391
1
06-23-2020 09:54 AM
MikkelHylden
Occasional Contributor

Is it possible to edit the rotation angle of a marker symbol using Pro Python?  I have been able to get to the basic symbol rotation, but the value I need to change is in the rotation drop down of the symbol details in Pro, and I can't find a way to get to that in Python.  

Code snippet getting to the symbol on each layer's symbology object:


if sym.renderer.type == 'SimpleRenderer' :
   print (' angle: {0}'.format(sym.renderer.symbol.angle))
if sym.renderer.type == 'UniqueValueRenderer':
   for grp in sym.renderer.groups:
      for itm in grp.items:
           print (' angle: {0}'.format(itm.symbol.angle))

Thanks in advance.  

Tags (1)
0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

Alphabetical list of arcpy.mp classes—ArcPy | Documentation 

and

Symbol—ArcPy | Documentation 

angle—Read/Write; Double

it is supposed to be read and write


... sort of retired...
0 Kudos