HOW TO

Set the brightness theme of a grid using Avenue

Last Published: April 25, 2020

Summary

The brightness theme of a grid can be specified through Avenue using the GLegExt class on the GTheme legend.

Procedure

The following sample code can be used to set the brightness theme. This sample code uses datasets from the \esri\av_gis30\arctutor\spatial directory.

  1. Copy and paste the sample code below into a new script editor window.

    Code:
    'The following script shows how to set the brightness
    'To test, load the Spatial Analyst Extension
    'Add the Hillshd and Elevgrd themes to a View
    'Make Elevgrd the first theme in the TOC.
    '
    theView = av.GetActiveDoc
    thetheme = theView.Getthemes.Get(0) 'Elevgrd
    theLegend = thetheme.GetLegend

    theGLegExtension = theLegend.GetExtension(GLegExt)
    theGLegExtension.SetbrightnessthemeView(theView)
    theGLegExtension.SetbrightnessthemeName("hillshd")
    theGLegExtension.SetbrightnessRange(4, 89)

    thetheme.UpdateLegend

  2. Press the Compile button.
    [O-Image] Script compile button
  3. Tile the ArcView window so you can see the View and Script windows at the same time.
  4. Click from the View directly to the Script window.
  5. From the script window, click the Run button.
    [O-Image] Run compiled script button

Article ID:000005210

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic