Add a North Arrow to a layout using Avenue

Last Published: April 25, 2020


This article contains a script that adds a North Arrow to a layout.


  1. Open a new script window.

    A. Activate the Project window.
    B. Click the Scripts icon.
    C. Click New.

  2. Paste the following code into the new script window:

    theDoc = av.GetActiveDoc
    theODB ="$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)

  3. Attach the script to a button on the Layout GUI.

    A. Compile the script.
    B. Switch to the Project window.
    C. Select Customize from the Project menu.
    D. On the Customize dialog, select Layout under Type dropdown.
    E. Select Buttons under Category.
    F. Click the New button.
    G. Double-click the Click property in the Customize dialog box.
    H. Enter the name of the script in the Script Manager and click Select.
    I. Close the Customize dialog box.

    For more information, see 'Customize dialog box' in ArcView Help.

  4. Open the layout and click the new button.

Article ID:000003972

  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options