English

How To: Symbolize a point theme using an icon as a marker

Summary

This article contains an Avenue script that creates a point theme legend using icons, found in the Icon Manager, as markers symbols.

Procedure

  1. Load a Point theme into a view.
  2. Open a new script window.

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

  3. Paste this code into the new script window:

    Code:
    '-- Script for accessing the icons from ArcView's Icon Manager
    '
    '-- The following line identifies the icon in the Icon Manager
    '-- that will be returned. In this case the 22nd icon in the list.
    '-- Change this number to the icon you would like to use to
    '-- symbolize your theme.

    anIcon = IconMgr.GetIcons.Get(21)

    aSym = BasicMarker.Make
    aSym.SetStyle(#BASICMARKER_STYLE_ICON)
    aSym.SetIcon(anIcon)
    theView = av.getactivedoc
    theTheme = theView.getactivethemes.get(0)
    theLegend = theTheme.GetLegend
    theSymList = theLegend.GetSymbols
    theSymList.Set(0, asym)
    theTheme.UpdateLegend
    theTheme.InvalidateLegend

  4. Attach the script as a button to the View GUI

    A. Compile the script.
    B. Switch to the Project window.
    C. Select Customize from the Project menu.
    D. On the Customize dialog box, click the Type dropdown arrow and click View.
    E. Select Buttons under Category.
    F. Click the New button.
    G. Double-click the Click property in the Customize dialog box.
    H. Type 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.

  5. Click the new button to run the script.