Element Templates in DGN Libraries
An element template defines properties of elements. Templates should be created and maintained in DGN libraries. This allows administrators to create templates in one place and to distribute them to many users. Templates can be applied to existing elements. They also can be used to set the active settings for element placement. The primary purpose of templates is to increase consistency when drawing.
A template stores multiple element properties. You can set general properties such as level, color, line style, and line weight; closed linear properties such as area, fill color, and fill type; text styles and text style overrides; cell properties; point properties; pattern properties; multi-line styles; dimension styles; and materials. Once you have set up templates you can apply them to existing elements or use them to create elements.
Elements can retain an association to the template that was active when they were placed. This is useful because elements that contain a reference to their template can be resymbolized when properties in the template are modified. If the template is one that was created and stored in the open DGN file, this means the associated elements will be resymbolized automatically when properties in their template are modified.
When you place an element that is associated with a template, the template is copied into the open DGN file if it is not already in the file. If the template is one that was copied from a DGN library into the open DGN file, you must run the Standards Checker or use a menu item in the Element Templates dialog to resymbolize the elements.
Templates are stored in hierarchical groups (template groups) to allow for efficient organization. These templates and template groups can be stored in a DGN file or in DGN libraries. If you wanted to define and distribute company-wide drawing standards, you could define and store templates in DGN libraries and share them with all employees.
When you open or create a DGN file you can use all templates stored in all DGN libraries specified by the MS_DGNLIBLIST configuration variable, as well as the templates in the open DGN file.
Using the Element Templates dialog, you can add, modify, rename, and delete templates and organize them in template groups. You can import data from XML files to create templates and export template data to XML files. You can generate an HTML report of all the template data in the open DGN file to put into a printed report on your company's standards, for example.
The Standards Checker is used to validate templates. You can check the open DGN file's local templates against those defined in the DGN libraries. You also can check all elements in the open DGN file against the local templates with which they are associated.