Important! You can use two kinds of macros in erwin® Data Modeler: the macros in the Macro Toolbox (documented here) and the macros in the Template Editor (used during Forward Engineering). For documentation on the Forward Engineering macros, please refer to the Template Language and Macro Reference document installed with the product.
A macro is one instruction that incorporates a sequence of simpler instructions. In erwin Data Modeler (erwin DM), there are over 190 predefined macro commands that you can use to enhance modeling. For example, you can use macros to customize built-in trigger templates or write stored procedures. You can use a macro to recycle portions of DDL scripts or, in model naming, use macros for logical-to-physical name mapping. Macros are also useful to create new model templates or accommodate the varying syntax of different DBMSs.
The erwin DM predefined macro commands contain actions that are familiar to you from other programming languages. Macros can perform the following statements:
erwin DM predefined macro commands can also:
Some of the erwin DM macros are very useful in a logical model, specifically in domains (naming rules, boilerplate definitions) and model naming options like name mapping.
Macros are implemented as:
Except in inheritable definitions and notes within the Domain Dictionary Editor, every dialog where you can edit scripts, the Macro Toolbox is accessible to help you do this. The Macro Toolbox contains all the erwin DM macros and the macros are grouped together according to the types of model objects with which they are used: Entity, Relationship, Attribute, Constraint, and Miscellaneous. Table macros are grouped with Entity macros, and column macros are grouped with Attribute macros. When you select a specific macro, the Macro Toolbox describes the macro and provides an example based on the sample diagram. The Macro Toolbox is also "non-modal," meaning you can have it open while you work on the script.
Copyright © 2017 erwin Inc.
All rights reserved.
|
|