How to change the Style of North Arrow programmatically using Python?

1631
5
11-08-2016 12:00 PM
Rohit_Venkat_GandhiMendadhala4
New Contributor

Is there any way to change the style of the North Arrow from ESRI North 4 to ESRI North 1 programmatically using Python. I have been searching all over the internet from 2 days but could not find a way to do it. Did ESRI come up with any new concept to overwrite the styles of a North Arrow. Can I add all North Arrows to a dummy layout and then import that North arrows to my desired maplayout and over write the North Arrow?

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

it is part of the graphicelement  class GraphicElement—ArcPy | ArcGIS for Desktop From appearances you have to have the element to modify its location, I don't see any 'replace' option

0 Kudos
Rohit_Venkat_GandhiMendadhala4
New Contributor

I see that the style of North Arrow can be changed only via "ArcObjects".

https://community.esri.com/thread/118723?q=how%20to%20change%20style 

Is this functionality to change the style of the North Arrow is available in ArcGIS Pro 1.3

0 Kudos
DanPatterson_Retired
MVP Emeritus

The help file link is for Pro 1.3, which is what I assumed you were using, since you didn't specify otherwise.  Are you interested in future versions?  I wouldn't hold out for arcpy to be a replacement for arcobjects anytime soon, however.

0 Kudos
Rohit_Venkat_GandhiMendadhala4
New Contributor

Yeah, I want to change the style of NorthArrow in ArcGIS Pro 1.3 using Python. I am trying to run a code in Pycharm and get the style changed. But nothing gets changed. I do not understand if its possible with arcpy or not in Arc GIS pro

0 Kudos
DanPatterson_Retired
MVP Emeritus

If you notice arcpy.mapping and arcpy.mp and the interaction with layout elements are solely for moving stuff that exists around on the layout.  So, it already has to exist before you can move it.  If you examine the object model and the classes and functions, I don't see anything remotely associated with getting and/or replacing objects... just moving and/or resizing.  I would investigate arcobjects if this is a huge issue, it may just save you a load of time searching for something that isn't in the help files.