Triangle graphic element


Purpose
This sample demonstrates an implementation of a custom graphic element. These elements can be used to create triangle graphic elements in the map and move, rotate, resize, and modify their symbol.
 
This sample demonstrates the technique for serializing elements into a map document (.mxd) in addition to backwards compatibility support, such as serializing elements into a ArcGIS 8.3 map document.

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.

  1. Open the solution using Visual Studio.
  2. Build the solution to make the TriangleElement class library.
  3. Use this command in an application with a MapControl and ToolbarControl, or in ArcMap.
  4. Add the TriangleElementTool to the ToolbarControl. The tool (Triangle Element) can be found in the .NET Samples category.
  5. Run the application and add, then choose the Triangle Element tool. Use the tool to add new triangle elements to the map. Use the Select Elements tool to resize and move the triangle elements. Use the Rotation tool to rotate triangles.
  6. Save your map document containing triangle elements or use Save a Copy to save the triangle elements to a pre ArcGIS 9.0 map document file (.mxd).

TriangleElementClass.cs Implementation file of TriangleElement.
TriangleElementTool.cs Tool implementation file to add new Triangle elements to the map.
Download the C# files
TriangleElementClass.vb Implementation file of TriangleElement.
TriangleElementTool.vb Tool implementation file to add new Triangle elements to the map.
Download the VB.NET files

Download the files for all languages

See Also:

Implementing cloning




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo