Create An Annotation Template

Land Desktop Map 3D Samples

 
Create An Annotation Template
 
 
 

This method takes one argument, the name of an ObjectData.Table table. It does the following:

  1. Gets a reference to the Project.ProjectModel object which represents the active project of othe Map 3D application.
  2. Uses the table name argument to get from the active project a reference to the ObjectData.Table object with that table name.
  3. Get a reference to the active project’s Annotation.Annotations object.
  4. Uses the Annotation.Annotations object to create an annotation template for the ObjectData.Table table.
  5. Uses the count of the number of fields in the ObjectData.Table table to calculate the height of an annotation.
  6. Uses Autodesk.AutoCAD.Colors.Color to create a color value for the annotation block.
  7. Loops through the ObjectData.FieldDefinition objects in the ObjectData.Table table and creates the structure of the annotation that will be attached to each centroid. This is described in topic Set An Attribute Definition.