Getting started > Getting started with System Architect > Getting started: Creating diagrams > Creating a diagram
  
Creating a diagram
Creating a diagram gives you a quick feel for the various ways to draw in System Architect, and on the many options available for setting drawing behavior.
Prerequisite
You must have the Samples encyclopedia opened.
Procedure
You can create a UML Class diagram as a representative example of a common diagram type that can be created with System Architect.
There are a number of ways to create a new diagram (all are discussed in the online help); for this example, you can use just one of the ways:
1 Select the UML view, and click + (plus sign) next to Packages to display a list of all packages already in the encyclopedia.
Expand the Logical View package (by clicking +), and then expand Reservation_System.
System Architect displays list of the diagrams that are in package, with the diagram type after the name.
2 To create a new diagram, right‑click the Packages folder, and then click New.
This graphic is described in the surrounding text.
3 In the Select new type for UML dialog, double-click Class that is listed under Diagrams to create a new Class diagram.
4 In the New Diagram dialog, type Drawing Class Diagram, and then click OK.
A dialog box appears where you specify the package that this diagram is in.
5 In the Package property, click Choices. Drag the Reservation_System package, and then click OK.
A blank diagram workspace appears.
6 In the toolbar for the new diagram, click the Class drawing symbol.
A drawing pen appears on the diagram workspace.
7 Click the drawing workspace to add a class symbol.
A symbol name dialog box appears.
8 Type Travel Agent, and then click OK.
You have just added a class to the diagram and to the encyclopedia. Since you are in draw mode, you can continue adding classes down in this same way; instead you can add information to the definition of this class.
9 Click the Select Mode pointer on the toolbar, or press Esc.
10 Open the class’s definition by double‑clicking the symbol.
A dialog box appears with properties of the class, for example: stereotype, class generation file, attributes, methods.
It include properties that are generic for all classes, and the properties that are specific to the modeling language that has been chosen (Java) in the System Architect Property Configuration dialog for this encyclopedia. You can add properties to the property set by using System Architect’s metamodel extensibility mechanism (USRPROPS.TXT): see Customizing System Architect.
11 Click the Attributes tab. In the grid, type the name of an attribute: Name, and then press Enter.
The attribute is added to the grid and the class’s definition.
12 Click in the Type cell next to the Name attribute, and then select char from the list of attribute types.
You can fill in other properties of this attribute through the grid, or select the attribute and click Define to open the full attribute definition. The grid displays all properties of the attribute, except those that contain text of more than 100 characters. To modify properties of that type, use the full definition dialog of the attribute.
Now add another attribute to this class, one that already has been defined within the context of another class in this encyclopedia.
13 Click Choices under the attribute grid.
System Architect displays a list of attributes that are in the encyclopedia, and the package and class that they are in, in this format:
attribute_name.package_name.class_name
14 To display the details of an attribute, right‑click it, and then click Details.
15 Drag the address [Reservation_System.Customer] attribute into the grid.
You are making a copy of the Address attribute. The copy belongs to the new Travel Agent class, and is independent of any changes made to the original Address attribute of the Customer class.
16 Click OK to close the class definition.
Next
Reusing information from encyclopedias
See also
Getting started: Creating diagrams