Prev | Next |
Save a Pattern as an Artifact
Enterprise Architect enables you to create a Pattern from selected elements in a diagram, and store the Pattern as an Artifact element in the model. You can then drop the Artifact into any diagram in the model to recreate the stored Pattern. This is similar to publishing a diagram as a Pattern, except that :
- Only the selected elements in the diagram are saved as a Pattern
- The Pattern is saved in an Artifact in the model and not as an XML file in the file system
Save Diagram Elements as a Pattern in a New Artifact
Follow the steps in this table.
Step |
Action |
---|---|
1 |
Open the appropriate diagram, hold down the and click on each element that you want to include in the Pattern. You could also 'drag' across a set of elements in the diagram to save as a Pattern. |
2 |
Right-click on one of the selected elements and click on the 'Save Selected Elements as Pattern' option. The 'Save Diagram Pattern in Artifact' dialog displays.
|
3 |
If the 'Save Using' field does not show the value 'New Artifact', click on the drop-down arrow and select this value. If this is the first Pattern Artifact in the model, the field defaults to this value as the only value it can have. |
4 |
The 'Name' field defaults to the name of parent diagram plus '_Pattern'. Either leave this name or overtype it with your preferred Pattern name. |
5 |
The 'Save to' field defaults to the name of the diagram's parent Package. Either leave this Package name or click on the icon and browse for a different Package under which to create the Artifact. |
6 |
Click on the to generate the DiagramPattern stereotyped Artifact under the selected Package. The selected elements are saved as a Pattern within the Artifact. |
Apply Pattern from Artifact to a Diagram
Follow the steps in this table.
Step |
Action |
---|---|
1 |
Open the diagram into which you will paste the Pattern from the Artifact. The diagram must be in Graphical View, and not in Internal Specification View, Gantt View or List View. |
2 |
Locate the required DiagramPattern stereotyped Artifact in the Browser window and drag it onto the open diagram. New elements and connectors are generated in the diagram from the Pattern. |
Update a Pattern in an Artifact
There are two similar methods of updating a Pattern held in an Artifact.
Method |
Description |
---|---|
1 |
Follow steps 1 and 2 in the Save Diagram Elements as a Pattern in a New Artifact table, then set the 'Save Using' field to 'Existing Artifact'. Click on the 'Name' field and on the name of the Pattern to update. The 'Save To' field grays out, as it uses the Package address of the existing Artifact. Click on the ; the Artifact is updated with the new Pattern of elements. |
2 |
Open the diagram containing the elements to make up the Pattern. In the Browser window, click on the DiagramPattern Artifact to update with a new Pattern. In the diagram, select the required elements, then right-click and select the 'Save Selected Elements as Pattern' option. The 'Save Diagram Pattern in Artifact' dialog displays with the 'Save Using' field defaulted to 'Selected Artifact' and the other two fields grayed out. The 'Name' field shows the name of the selected Artifact. Click on the ; the selected Artifact is updated with the new Pattern of elements. |
Notes
- In the Corporate, Unified and Ultimate editions of Enterprise Architect, if security is enabled you must have 'Update Diagrams' permission to generate the Pattern from the DiagramPattern stereotyped Artifact into a diagram