English

How To: Maintain attribute indexes when pasting a theme to a new view

Summary

When you paste a theme to a new view, Spatial and Geocoding indexes are maintained, but attribute indexes are not. If you want the paste operation to maintain the attribute indexes, you need to make a slight modification to the 'View.Paste' system script. This article shows you the change you need to make to this script.

Procedure

This modification will allow for all attribute indexes to be maintained when you paste a theme to a new view.

  1. Open a new script window.

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

  2. Load the system script View.Paste.
  3. Find the line:

    Code:
    theView.Paste

  4. Add the following after the above line:

    Code:
    for each aTheme in theView.GetActiveThemes
    if(aTheme.is(FTheme)) then
    aTheme.GetFtab.Refresh
    end
    end


    Note:
    For more information about making modifications to the default GUI, see ArcView Help > Customizing and programming ArcView with Avenue > Customizing ArcView.

  5. Click the Compile button.
    [O-Image] Script compile button
  6. Save the script as View.Paste.

    A. Select Properties from the Script menu.
    B. Type in a new name in the Name field.
    C. Click OK.