MapBook Templates

AutoCAD Map 3D .NET API

 
MapBook Templates
 
 
 

A Map Book template is an AutoCAD template (.dwt) file with some special characteristics.

The template file must define at least one layout. The layout can contain viewports for the following purposes:

  • Map view, which displays the map for the area covered by a particular sheet
  • Key view, which displays a small image of the entire map, outlining the area covered by the map sheet
  • Map legend, which displays the map legend

The layout can also contain special blocks that show links to adjacent map sheets. Within AutoCAD Map 3D or a DWF file, the links can be used to jump directly to an adjacent sheet.

The layout can also contain a title block.

To identify objects in the template as any of the special views or blocks, call the static function MapBook.SheetTemplate.MarkElement() with the object id and element type. For example, to mark an object as the map view, call

MapBook.SheetTemplate.MarkElement(objId, _
   MapBook.TemplateElementType.MapView)

Adjacent Map Sheets

The arrows pointing to adjacent map sheets are AutoCAD block references. Each block can have an attribute that defines the direction of the arrow and creates a link to the adjacent sheet.

To create an arrow to an adjacent map sheet, place a block reference of the desired shape and orientation into the map. The block reference should have an attribute named TAG. Set the text string of the attribute to an expression that defines the adjacent sheet. This expression is of the form:

%<\AcSm Sheet.direction >%

where direction is one of the following:

  • Top
  • Bottom
  • Right
  • Left
  • TopRight
  • TopLeft
  • BottomRight
  • BottomLeft