IRotationRenderer Sample


This sample turns marker symbols into arrows where the size represents velocity and the arrow is rotated to reflect a wind direction.

A ProportionalSymbolRenderer is used with additional settings in the IRotationRenderer interface to display arrow markers showing wind direction and velocity. The shape file "wind.shp" is used and this must be the first layer in the focus map. Two fields are used from the shape file:

How to use:

    Steps for adding the sample in as a VBA module

  1. From ArcMap launch VBA through Tools/Macros/Visual Basic Editor
  2. From VBA load in the module "IRotationRenderer.bas" through File/Import File ...
  3. Return to ArcMap and add in the required data through File/Add Data. The shape file "...\arcexe83\ArcObjects Developer Kit\Samples\Data\Wind\wind.shp" must be loaded and placed as the first layer in the table of contents. Additional background data is also useful, for example "...\arcexe83\ArcObjects Developer Kit\Samples\Data\Usa\states.shp".
  4. To execute the VBA sample, select Tools/Macros/Macros then run "setRotationRenderer"


Requires: Shape file "wind.shp" loaded as the first layer in a map

Difficulty: Beginner

Visual Basic
File Description
IRotationRenderer.bas VBA module file with code to setup proportional symbol renderer with rotation renderer interface

Key CoClasses: ProportionalSymbolRenderer
Key Interfaces: IProportionalSymbolRenderer, IRotationRenderer
Key Members: IRotationRenderer::RotationField