Creating a Pattern

From RAD Studio
Jump to: navigation, search

Go Up to Modeling Pattern Procedures

You can use existing diagram elements as the basis to create custom patterns. The newly created patterns are stored in the Pattern Registry. They become visible in the pattern tree of the Pattern Organizer and can be used to generate design elements in diagrams.

To create a pattern:

  1. Select one or more elements on a diagram.
  2. Right-click and choose Save as Pattern on the context menu of the selection. The Create Pattern Wizard opens.
  3. On the General page of the wizard enter the following information:
    • In Name, specify the name of the new pattern.
    • In File, specify the target XML file name.
    • Optionally, enter the pattern description in Description.
    • Optionally, check Create Pattern Object. Selecting this option allows you to use your pattern as a First Class Citizen. This means that an oval pattern element displays on your diagrams when applying the pattern.
    • Click Next.
  4. On the Pattern Parameters page of the wizard:
    • Use the in-place editors to modify the parameters as required.
    • Set the Use Existent property for the pattern. If this value is checked, elements existing on the diagram are reused when you apply the pattern. This means that whenever you apply a pattern, a new element is not created if there is an element with the same name and metatype in the target container. If you clear the Use Existent property, then new elements are created.
    • Click Next.
  5. In the Select tree folder page that displays the current patterns structure, choose the target virtual folder, and click Finish.

Result: The new pattern is added into the specified virtual folder. This pattern is visible in the pattern tree and can be used to generate design elements.

See Also