Page History
...
Basic Modeling Demonstrations: Add/Remove, Item, String and Attribute Editing
TopicCode Sample | Description |
---|---|
Add Base Attributes to Person Entity | Adds Add base attributes to selected entities, which represent people. It willalso introduceintroduces a primary key based upon the entity's name. |
Add Definition to Type Entities | Add a definition to selected entities. The definition applied to the selected entity willalso includeincludes the object's name automatically, as in "My definition text + entity name +(s)". |
Add Parent Name Prefix to Propagating Key | Add the entity name as a prefix to all attribute role names. It demonstrates how to use the FKColumnPair object. |
Add Table Name Prefix Globally | Add a prefix string to the names of all entities in the model. The macro opens a dialog box prompting the user for the prefix. If the current active model is logical, it will assignassigns the prefix to all entity names. If the current model is physical, it will assignassigns the prefix to all table names. |
Add Table Name Prefix Selectively | Add a prefix string to the names of selected entities in the model. The macro opens a dialog to prompting the user for the prefix. If the current model is logical, it assigns the prefix to selected entity names. If the current model is physical, it will assignassigns the prefix to selected table names. |
Add Table Owner Globally | For physical models, this will updatecode updates the owner field in the table editor for all tables in the active model. The active model must be a physical model. |
Add View Owner Selectively | For physical models, this will updatecode updates the owner field in the view editor for all selected entities. The active model must be a physical model. |
Attachment Example | Exports Export attachment data for each bound attachment for every selected table in the active model. The file name and path isare: "C:\Attachment Data.txt. |
Attribute Binding Macro | Lists List all the unbound attributes/columns of all the models (logical and all physicals) and domains. The attributes can then be boundedYou then can bound the attributes to any of listed domains by pressingclicking the "Bind "button. |
Auto-Align Selected Entities Left | Performs Perform the align left 'operation (similar to the align buttons on the Alignment Toolbar) for all selected entities. This macro demonstrates more on how to use entity display objects. |
Auto-Color All Entities with FKs | Make all entities with foreign keys purple. It will first select (highlight)first selects or highlights all entities in the current ,submodel. Then it will makemakes all selected entities with foreign keys (which, in this case, are all the entities in the submodel) purple. Finally, it will deselect (unhighlight)deselects or unhighlights all entities in the current, active submodel. This macro illustrates how to use entity objects, entity display objects, and selected objects -, and how to distinguish among 'them. |
Auto-Combine Selected Entities | Takes Take all the attributes from all the selected entities and add them into one newly-created entity. IncludesIt include a separate function GetAveragePoint(), this function will getwhich gets the average x or y coordinate point among all selected entities. The second parameter determines whether to calculate the average x coordinate or the average y coordinate. |
Auto-Convert Datatype | Iterate through all the selected entities and change the datatypes for all attributes which use VARCHAR to TEXT. |
Auto-Create Data Dictionary and Bound Domain | Creates Create a new diagram, and then create a rule, default, and domain in the data dictionary. Then it will bindIt then binds the rule and default to the domain . Next, it willand then createcreates an entity and an attribute. Finally, it will bindbinds the domain to the attribute. |
Auto-Create Data Dictionary | Creates Quickly create a user-defined data dictionary quickly. The macro can be usedYou can use the macro as a template to create user-defined or business-specific data dictionaries. This macro can be insertedInsert this macro into ER/Studio's ERSBasicHandlers system (specifically in the '"CreateDiagramHandler(CurDiagram As Object)" section of ERSBasicHandlers) and if the Create Handlers option is checked onin ER/Studio's Automation Interface Options, this Data Dictionary will beis created and populated any time a user creates a new diagram. |
Auto-Create New Diagram | Creates Create a new diagram. The new diagram will containcontains an IBM DB/2 physical model and six entities in the physical model. |
Constraint Generator | Generates Generate constraints from the defined reference values. TheYou must define the reference values must be definedin the data dictionary of ER/Studio. The macro can select from bound attributes, all attributes, bound domains or all domains. This is chosen with the radio buttons at the bottom of the dialog. Note that you must insert the constraint will be inserted ininto the check constraint/rule tab of the domain or attribute. |
Convert Name Case | Converts Convert the case of Attributes, Columns and Entity/Table names for the highlighted tables/Entities in the active SubModel to all upper or lower case. Works in Logical or Physical models. |
Definition Editor | Lists List all the tables and allowsallow the user to update the definition field for the table ,by pressing the "update" button. There will also beUpdate button. There also is a list of columns for the respective table ,that the user can use to update the definitions for each column. This macro will runruns on a logical or a physical model and populatepopulates the lists accordingly. |
Domain Bindings Export to Excel | Lists List all the tables and allow the user to update the definition field for the table ,by pressing the "update"Update button. There willalso beis a list of columns for the respective table ,that the user can use to update the definitions for each column. This macro will runruns on a logical or a physical model and populatepopulates the lists accordingly. |
Domain Bindings Import from Excel | Exports Export domain bindings for all the attributes in the current model. The existing columns in the spread sheetspreadsheet must be left in the same format if the bindings are going to be used to import back into a model. Note that the attribute data type is only in the spread sheetspreadsheet for informational purposes when refactoring attributes and columns and assigning them to domains. |
Domain Bindings | Imports Import domain bindings from Excel. I will mapIt maps domains to attributes or columns depending on the data in the spread sheetspreadsheet. The macro provides an interface to select the dictionary where the domains are located and the model to search for the attributes or columns. When importing into a physical model, the spread sheetspreadsheet must have the physical table and column names that match the selected physical model. When importing into the logical model, the names in the spread sheetspreadsheet must match the entity and attribute names. |
Example Macro: Loop through Objects of Active Submodel | Brings Bring up a dialog box that shows all attributes bounded to a selected domain. It also allows the user to unbind specific attributes from the selected domain. The dialog box contains two list boxes and two buttons. The firstDomains list box , "Domains",shows all the domains in the diagram. The secondBounded Attributes list box , "Bounded Attributes",shows all the attributes bounded to the selected domain in the "Domains "list box. There isalso are an "OK "button and an "UnBind"Unbind button. The user can press the "UnBind" buttonClick Unbind to unbind selected attributes in the "Bounded Attributes "list box from the selected domain in the "Domains "list box. |
Export Domain Info to Excel | Exports Export the domains and their properties to excelMicrosoft Excel. Each record in the Excel spread sheet represents on domainsspreadsheet represents a domain from the data dictionary. The spread sheet can be usedYou can use the spreadsheet to store domains outside of ER/Studio. TheYou can update the domain properties can be updatedin the spread sheetspreadsheet and importedimport them back into an existing model or a new model using the "Import Domains From Excel " macromacro. The columns in the spread sheetspreadsheet must remain in the same order to import them properly . REQUIREMENT: You must have MS Excel 97 or later installed. |
Export Index Column Info to Excel | Generates Generate an index column report for the active model in ER/Studio. Each record in the Microsoft Excel spread sheetspreadsheet represents an indexed column. The spread sheet can be usedYou can use the spreadsheet to apply naming conventions to indexes. TheYou can read in the new index name can be read inwith the "Import Index Names from Excel "macro from the "New Index Name " columncolumn in the spread sheet. REQUIREMENT: You must have MS Excel 97 or later installedspreadsheet. |
Metadata Import/Export and Formatting Examples
...