How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Add and use the move-graphic-along-path functionality in ArcMap
- Compile the sample project in Visual Studio.
- Start ArcMap and click Customize, Toolbars, and Animation. The Animation toolbar appears.
- Click Customize, then Customize Mode. The Customize dialog box appears.
- On the Commands tab, locate the Animation Developer Samples category.
- Drag the Move Graphic along Path command from the Animation Developer Samples category to the Animation drop-down on the Animation toolbar. Close the Customize dialog box.
- Add a line feature layer on to the table of contents (TOC) in ArcMap; or alternatively, draw a line graphic element on the ArcMap display.
- Draw a point graphic element (or a text element) on the display and symbolize it as necessary.
- Select the point graphic element (or the text element) and a line feature (or line graphic). The Move Graphic along Path command is enabled.
- On the Animation drop-down, click the Move Graphic along Path command.
- Accept all default settings and click the Import button on the Move Graphic along Path dialog box to create a track.
- Play the animation and the point graphic element (or text element) moves along the selected path.
Additional information
-
If more then one line feature (or line graphic) is selected, only the first one is used as the path of the movement.
-
You can elect to show the trace of the moving graphic element by selecting the Trace path option on the Move Graphic along Path dialog box when you create the track.
-
You can change the Trace path option after a track is created by opening the Animation Manager and selecting the track on the Tracks tab. Click Properties, then click the Graphic Track Properties tab. The Trace path option is available on this tab.
-
You can change the symbology for the point graphic element (or text element) and the line graphic representing the trace on the ArcMap display window.
AnimationTypeMapGraphic.cs | The map graphic animation type class. |
MapGraphicKeyframe.cs | The map graphic keyframe class. |
cmdMoveGraphicAlongPath.cs | Command for creating move-graphic-along-path animation. |
frmCreateGraphicTrackOptions.cs | Dialog box to get the parameters for creating move-graphic-along-path animation. |
MapGraphicTrackPropPage.cs | Map graphic track property page. |
AnimationUtils.cs | Utility code for creating a move-graphic-along-path animation. |
MapGraphicTrackExtension.cs | The Map graphic track extension class. |
AnimationTypeMapGraphic.vb | The map graphic animation type class. |
MapGraphicKeyframe.vb | The map graphic keyframe class. |
cmdMoveGraphicAlongPath.vb | Command for creating move-graphic-along-path animation. |
frmCreateGraphicTrackOptions.vb | Dialog box to get the parameters for creating move-graphic-along-path animation. |
MapGraphicTrackPropPage.vb | Map graphic track property page. |
AnimationUtils.vb | Utility code for creating a move-graphic-along-path animation. |
MapGraphicTrackExtension.vb | The Map graphic track extension class. |
Download the files for all languages
Development licensing | Deployment licensing |
---|---|
ArcGIS for Desktop Basic | ArcGIS for Desktop Basic |
ArcGIS for Desktop Standard | ArcGIS for Desktop Standard |
ArcGIS for Desktop Advanced | ArcGIS for Desktop Advanced |