Hi,
I have been using arcpy.mp to automate map production but am having trouble with the listColorRamps() method.
I am running Python 3.6.5 and ArcPro 2.2.1.
If I run this code in the python window within an open aprx, I get a long list of available Color Ramp objects:
aprx=mp.ArcGISProject("CURRENT")
aprx.listColorRamps()
However, if I run similar code in IDLE, aprx.ListColorRamps() returns an empty list, and the rest of my map automation therefore fails.
aprx=mp.ArcGISProject(path+"/template.aprx")
aprx.listColorRamps()
Has anyone else experienced this and/or know of a workaround?
Thank you!
something is amiss
check your path to begin with and I noticed that you don't have arcpy before mp… could be a namespace issue.
I recommend not shortcutting shortcuts in code. And you can get its name and that is about all