Modeling Productivity Macros

   Add Base Attributes To Person Entity: Adds base attributes to selected entities, which represent people. It will also introduce a primary key based ' upon the entity's name.

   Add Definition to Type Entities: Adds a definition to selected entities. The definition applied to the selected entity will also include the object's name automatically, as in “My definition text + entity name +(s).”

   Add Parent Name Prefix to Propagating Key: Adds the entity name as a prefix to all attribute role names. This macro demonstrates how to use the FKColumnPair object.

   Add Table Name Prefix Globally: Lets the user add a prefix string to the names of all entities in the active model. A dialog box prompts the User for the prefix. If the active model is a logical model, the prefix is assigned to all entity names. If the active model is a physical model, the prefix is assigned to all table names.

   Add Table Name Prefix Selectively: Lets the user add a prefix string to the names of the selected entities in the model. A dialog box prompts the User for the prefix. If the active model is a logical model, the prefix is assigned to the selected entities’ names. If the active model is a physical model, the prefix is assigned to the selected tables’ names.

   Add Table Owner Globally: For physical models, updates the owner field in the table editor for all tables in the active model.

   Add Table Owner Selectively: For physical models, updates the owner field 'in the table editor for all selected entities.

   Add View Owner Globally: For physical models, updates the owner field in the view editor for all tables in the active model.

   Add View Owner Selectively: For physical models, updates the owner field in the view editor for all selected entities.

   Attribute Binding Macro: Lists all the unbound attributes/columns of all the models (logical and all physicals) and domains. The attributes can then be bounded to any of listed domains by pressing the “Bind” button.

   Auto-Convert Datatype: Iterates through all selected entities to determine which attributes use the VARCHAR datatype, then changes the datatype to TEXT.

   Auto-Create Data Dictionary and Bound Domain: This macro follows several steps during its execution. First, it creates a new diagram and adds a rule, default, and domain to the Data Dictionary. Next, it binds the rule and the default to the domain. Then it adds an entity to the diagram, and adds an attribute to the entity. Finally, it binds the domain to the attribute.

   Auto-Create Data Dictionary: Creates a user-defined data dictionary quickly. The macro can be used as a template to create user-defined or business-specific data dictionaries. This macro can be inserted into ER/Studio DA's ERSBasicHandlers system (specifically in the '"CreateDiagramHandler(CurDiagram As Object)" section of ERSBasicHandlers) and if the Create Handlers option is checked on in ER/Studio DA's Automation Interface Options, this Data Dictionary will be created and populated any time a user creates a new diagram.

   Auto-Create New Diagram: Creates a new diagram that contains six entities in the logical model, then generates a physical model that uses the IBM DB/2 database platform.

   Generate Constraints From Reference Values: Generates constraints from the defined reference values.

   Convert Name Case: Converts the names of the selected tables or entities in the active model to all upper- or lower-case letters. A dialog prompts the User to decide if the names should be in upper- or lower-case letters.

   Definition Editor: Lists all the tables and allow 'the user to update the definition field for the table, by 'pressing the “update” button. There will also be a list of columns for the respective table that you can use to update the definitions for each column.

   Domain Bindings: Opens a dialog that shows all domains in the diagram’s Data Dictionary, and all attributes that are bound to a selected domain. The User can view which attributes are bound to a selected domain; the User can also unbind specific attributes from the selected domain.

   Example macro-Loop Through Current Submodel: Demonstrates how to loop through the objects of the current submodel.

   Get Related Entities: This macro selects the related parents and/or child of the selected tables. To use the macro lasso a group of entities on the diagram or select them in the diagram tree, then right click on the macro to execute. Parents and children will be selected depending if the option is checked. This macro can be used to assist in submodel creation.

   Import Data Dictionary: Imports Data Dictionary objects from a specially formatted text file. The macro contains guidelines in its comments that outline and describe the file format that must be used.

   Index Naming: Applies naming conventions to all types of indexes. It provides an option to use the selected tables or all tables.

   Name Foreign Constraints: Prompts the user with a dialog to specify the naming convention for Foreign Constraints. It will then name all the constraints using the parent and child table names. It will also make sure the name is unique by adding an index for the last characters of duplicate names.

   Name Primary Constraints: Names all primary key constraints with the given naming conventions. The table name with either a prefix or suffix.

   Notes Editor: Lists all the tables and allow the user to update the notes field for the table, by pressing the “update” button. There will also be a list of columns for the respective table, that the user can use to update the notes for each column.

   Selectively Output PK and FK DDL: Outputs DDL for primary and foreign constraints for all selected tables. To operate, selected the desired tables, then right-click on the macro to execute. The DDL can be previewed or written to a file.

   Switch Domain Bindings: Scans all the columns and attributes in the active model or all models and switches the domain bindings from the source domain to the target domain. The information for each bound column will be updated with the target domain. Any domain overrides will be preserved.