ArcObjects Library Reference (Display)  

ITemplate Interface

Provides access to members that control the template.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

ITemplate is the pattern of marks and gaps that are used to draw a line symbol. A mark and gap together are refered to as a pattern element. The pattern element is drawn based on the value of the mark and gap, which is specified in points (approx 1/72 inch). The mark is something that is drawn, hence it can be a marker symbol in a IMarkerLineSymbol, a hash in a IHashLineSymbol, or a dash in a ICartographicLineSymbol.
The width of the mark is arbitrary, in that you must specify it (in previous versions of ArcGIS for Desktop Advanced [ArcInfo] and ArcGIS for Desktop Basic [ArcView], the width of the mark and gap were the same size, and based on the width of the element that was being repeated within the template).
The mark that is drawn in the template (marker, hash, or dash) will be centered on the mark. Thus, if you have a marker symbol that is size 10, you would likely specify a mark value of 10. Then if you want no gap between the markers, specify the gap to be 0 (zero). But if you wanted a space of 20 points between each marker, then you'd specify the gap to be 20.

If you don't want the mark to be the first element in the line, then you need to use at least two pattern elements. The first one would start with a mark of 0 (zero), which indicates that no mark is to be drawn, and then a gap that matches the distance you want to inset the mark along the line.

Members

Description
Method AddPatternElement Adds a pattern element.
Method ClearPatternElements Clears all pattern elements.
Method DeletePatternElement Removes the pattern element at the given index.
Read/write property Geometry The pattern geometry.
Method GetPatternElement Gets pattern element properties for a given index.
Read/write property Interval The interval.
Method MovePatternElement Moves a pattern element.
Read-only property PatternElementCount The number of pattern elements.
Method QueryNextLine Queries for the next line in the pattern.
Method QueryNextPoint Queries for the next point in the pattern.
Method Reset Resets the enumerator.
Method Setup Set up items needed by template.

CoClasses that implement ITemplate

CoClasses and Classes Description
Template Stores information on the mark and gap patterns for lines.

See Also

ICartographicLineSymbol Interface | ITemplate Interface | ILineSymbol Interface | IMultiLayerLineSymbol Interface | IHashLineSymbol Interface | IPictureLineSymbol Interface | ILineProperties Interface

.NET Snippets

Create Cartographic Line Symbol

.NET Samples

Dynamic biking (Code Files: DynamicBikingCmd)

.NET Related Topics

How to make a cartographic line symbol