Annotation Overrides

AutoCAD Map 3D .NET API

 
Annotation Overrides
 
 
 

An annotation override can be applied when an annotation reference is created. It changes selected properties of the annotation template. For example, an annotation override can change the color or text size of the annotation.

Annotation overrides can apply to the static properties of the annotation, which are set using the AttributeDefinition properties, or the dynamic properties, which are set using expressions.

Annotation overrides correspond to the Insert Options and Insert Properties of the Insert Annotation dialog in the UI.

For example, to override the static color, set the ColorOverride property of the annotation override. To override a color set using an expression, set the ColorExpressionOverride property.

To apply an annotation override, insert the annotation using AnnotationTemplate(ObjectId, AnnotationOverrides). For example:

Dim annOverrides As New Annotation.AnnotationOverrides
annOverrides.Clear()
Dim greenClr As Autodesk.AutoCAD.Colors.Color = _
  Autodesk.AutoCAD.Colors.Color.FromColorIndex( _
  Autodesk.AutoCAD.Colors.ColorMethod.None, 3)
annOverrides.ColorOverride = greenClr
 
annTemplate.InsertReference(objId, annOverrides)