MagicDraw 18.4 Documentation

Skip to end of metadata
Go to start of metadata

You could create a generic table in one of the ways that are suitable for creating any diagram in MagicDraw.

This section describes several most popular ways of creating a generic table:

When creating a generic table you should specify the following:

  1. The name of a table and the owner package should be denoted first of all. This is mandatory.
  2. Element types that will be used in the table should be defined. This is mandatory.
  3. Elements corresponding to the element types should be selected. This is optional.
  4. Table columns should be specified. Columns represent element properties. This action is also optional. The creation of the table could be finished without specifying columns.

You can modify the table after it is created.

Creating a generic table without help of any wizard

Once created the table can be filled with data using the generic table environment capabilities.

 

To create a generic table without help of any wizard


  1. In the Containment tree, select an element that can be the owner of the generic table.
  2. Do one of the following:
    • From the main menu, select Diagrams > Create Diagram. Type “gen” and press Enter.
    • On the main toolbars, click the Create Diagram button. Type “gen” and press Enter.
    • Press Ctrl+N. Type “gen” and press Enter.
    • Right-click the element and from the shortcut menu select Create Diagram > Other Diagrams > Generic Table.

    The newly created generic table opens on the right side of the application window.

  3. Type the name of the table.
  4. Select element types.
    Selecting element types for generic table 

    Select desired element types and/or stereotypes in the Select Element Types dialog. The Element Type box in the Criteria area of the generic table will display the selected items. This action is optional, so you can continue the creation without selecting any type or stereotype. You will be able to modify selected element types when the generic table is created.

     

    If you drag an element from the Containment tree to the table, the type of this element will be automatically set as the Element Type box value.

  5. Add elements to the table in the following ways:
    • Specify the scope, from which the elements should be added to the table. All the elements afterwards created in that scope will be automatically added to the table.
    • Create new elements directly in the table or use the copy-and-paste command to transfer information from another resource.
    • Add existing elements to the table one by one.

      For detailed procedures, see Modifying generic tables.

  6. Add elements to the table in the following ways:

    For the detailed procedure, see Modifying generic tables.

Creating a generic table with help of the diagram creation wizard

Once created the table is already filled with data.

 

To create a generic table with help of the diagram creation wizard


  1. Open the Generic Table Wizard dialog. It could be done in one of the following ways:
    • On the Diagrams menu, click Diagram Wizards > Generic Table Wizard.
    • On the Analyze menu, click Model Visualizer.
  2. Type the name of the table and select the owner for it.

    Generic table creation wizard. Specifying name for new generic table and selecting its owner
  3. Select element types (see details in the preceding procedure).

    Generic table creation wizard. Selecting element types
  4. Select elements.

    Generic table creation wizard. Selecting elements 

    Select elements from the model tree and add them into the Selected list.

    Though you can select any element from the Model Browser, only the elements of selected types will be added into the generic table.
    If the generic table creating wizard is opened from one or more elements’ shortcut menu, the element or the set of elements will be added to the Selected list automatically.

    For more information about the element selection and dialog buttons, see Elements multiple selection.

  5. Specify the set of columns for showing on the table.

    Generic table creation wizard. Selecting columns

    The list of all available properties corresponding to selected element types is presented in the dialog. If selected element types have tags, they are also displayed in the list. All selected properties will be displayed as columns in the generic table. The Name property is selected automatically, all other properties should be selected by the user. 

    Select properties you need to see as columns to finish the table.

Creating a generic table for a set of selected elements using the diagram creation wizard

Note that element types, elements, and columns of the generic table will be selected automatically according to the set of selected elements

 

To create a new generic table for a set of selected elements


  1. Select a set of elements you want to add to the generic table.
  2. From the shortcut menu select Tools > Generic Table Wizard.
  3. Follow the steps described in  Creating a generic table with help of the diagram creation wizard  but note that element types, elements, and columns will be selected automatically according to the set of selected elements.

 

To create elements in the table from another resource


  1. Create a table.
  2. Select the element type.
  3. Choose the columns that you want to fill with copied information.

    The cells must be editable in the generic table.

  4. Copy table from another resource.

    The number of columns in that table should be the same as the number of columns in the generic table.

    The data types of columns in the generic table must be compatible with copied information.

  5. Press Ctrl+V (Cmd+V on OS X). Each row displays one element with its properties.

    • If the element already exists in the model, the information updates.
    • If elements have an ID prefixes in another resource, they are set automatically after copy-and-paste command only for pasted elements in the Generic Table. Manage ID prefixes in the Element Numbering dialog.

    Creating elements in generic table from another resource

  • No labels