HOW TO
This article contains a script that adds a North Arrow to a layout.
Code:
theDoc = av.GetActiveDoc
theODB = odb.open("$AVHOME\etc\north.def".asfilename)
theODBNEW = theODB.Get(0)
'-- Define Northarrow to grab
theArrowObj = theODBNEW.Get(0)
'-- r must be a rectangle on the View or Layout
'-- r is the rectangle on the View/Layout where the northarrow will be drawn
'-- The setarrow request adds the specified
'-- arrow to the defined rectangle area
r = theDoc.getDisplay.returnvisextent
if (r <> nil) then
gn = NorthArrow.Make(r)
gn.setarrow(theArrowobj)
gn.SetDisplay(theDoc.GetDisplay)
theDoc.GetGraphics.UnselectAll
gn.SetSelected(TRUE)
theDoc.GetGraphics.AddName(gn)
av.GetProject.SetModified(true)
end
Article ID:000003972
Get help from ArcGIS experts
Download the Esri Support App