Classify Manual

Created:2/15/1999
Last Modified:6/6/2000
Description:

This sample consists of a VBA macro that creates a new graduated color type classification, sets the class breaks (thus a manual classification), and assigns it to a feature layer. The sample also demonstrates how to build and use a color ramp, including loading/saving from a style. The macro also shows how to set the properties of the user interface to allow editing of layer symbology after rendering.

How to use:
  1. Open ArcMap and create a new map document.
  2. Use the 'Add Data' button to add ..\arcgis\arcexe83\ArcObjects Developer Kit\Samples\Data\Usa\states.shp to your map.
  3. Create a new macro (Tools--> Macros--> Create). Copy the code provided in ClassifyManual.bas and paste into the Visual Basic Editor of your map document.
  4. Run the macro

Application:
ArcMap

Requires: An ArcMap session with states.shp loaded.

Difficulty: Intermediate


Visual Basic
File Description
ClassifyManual.bas Module containing the macro


Key CoClasses: ClassBreaksRenderer, AlgorithmicColorRamp, StyleGallery, StyleGalleryItem
Key Interfaces: IClassBreaksRenderer, IClassBreaksUIProperties, IAlgorithmicColorRamp, IStyleGallery, IStyleGalleryItem, IEnumStyleGalleryItem
Key Members: IClassBreaksRenderer.Break, IClassBreaksRenderer.MinimumBreak, IClassBreaksUIProperties.ColorRamp, IClassBreaksUIProperties.LowBreak, IStyleGallery.Items, IStyleGallery.AddItem, IStyleGalleryItem.Name