AnsweredAssumed Answered

arcpy.mp listColorRamps() returns empty list ?

Question asked by molly.barth on Aug 29, 2018
Latest reply on Aug 30, 2018 by Dan_Patterson

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!

Outcomes