I can change the numbers of columns in the legend using arcpy.adjustColumnCount(column_count).

However, in my particular case I would like to know how many colums there are in the legend in the beginning and save that information as a variable, then change the number of columns to a specific value for a map and last change the number of colums back to the value of my variable.

Is there a possibility to do this?


It does not appear this python method exists. You may however use ArcObjects ILegendItem.Columns Property to access this information.

| improve this answer | |
  • I always thought there would be a way that I once used. However, you might be right. Is there an easy way to implement an ArcObject method into a Python script w/o having any idea how ArcObjects works? – Alex Jan 8 '16 at 8:31
  • 1
    There are a number of Q/As on this site related to this topic, check out: gis.stackexchange.com/questions/80/… – artwork21 Jan 8 '16 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.