Creating a Pattern
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:
- Select one or more elements on a diagram.
- Right-click and choose Save as Pattern on the context menu of the selection. The Create Pattern Wizard opens.
- 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.
- 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.
- 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.