Using a New MetaClass in a Diagram
If you consider it necessary to create a new MetaClass, you will certainly need to use it in one or several diagrams.
To do this, you must first connect the new MetaClass to the Diagram MetaClass.
You must then create a new diagram type view and associate with this view the new MetaClass you have created. Alternatively, you can connect the new MetaClass to an existing view.

A view groups one or several object types that can be used in a given diagram type.
You then have to assign an image (shape) to the new MetaClass. This shape will represent occurrences of the MetaClass in this diagram type.
The object shape contains a field used to display an attribute (normally the object name). This field can also be configured.
Finally, you can create and configure links that can be displayed in the diagram type concerned.
Creating a view in a diagram type
Before creating a new view, in the metamodel diagram connect your new MetaClass to the Diagram MetaClass.
To create a view in a diagram type:
1. In the MetaStudio navigation window, expand the Diagram Types folder.
2. Expand the folder of the diagram type concerned.
3. Right-click the DiagramTypeParam concerned and select Properties.
4. In the Views tab, click New.
A new view is created.
In the Characteristics tab of the view Properties:
1. In the DiagramTypeViewNumber field enter a value (between 1 and 30 inclusive).
2. Select DiagramTypeViewVisibility if you want this view to be visible by default in the diagram.
Adding a MetaClass to a view
A MetaClass that can be used in a diagram (DiagramTypeObject) must be associated with a view (DiagramTypeView).
To add an object type (DiagramTypeObject) to a view:
1. Open the view property pages.
2. In the MetaClasses tab, click New.
A new DiagramTypeObject is created. It appears in the list.
3. Open the new DiagramTypeObject property pages.
4. In the MetaClass field, click the arrow and select Connect MetaClass.
5. From the Query tool select the MetaClass that interests you and click OK.
The new DiagramTypeObject is now connected to the MetaClass you selected.
|
All DiagramTypeObjects must be connected to the Diagram MetaClass by the DiagramTypeLinkEnd MetaAssociationEnd.
|
Defining a shape for the new MetaClass
To define the shape that will be used for the new MetaClass:
1. In the DiagramTypeObject Property pages, select the Characteristics tab.
2. In the DiagramTypeShape box, enter the file mask to be used to graphically represent the object.
3. In the
MetaPicture tab, click
Connect 
to connect the image that interests you.
Defining a field in the new shape
The new shape you have created contains at least one field - that which enables display of the object name.
To define this field:
1. In the DiagramTypeObject Property pages, select the Fields tab.
2. Click New to create a new field (DiagramTypeField).
3. Open the DiagramTypeField Property pages and select the Characteristics tab.
4. In the DiagramTypeField Name box, specify the &name& value representing the name of the variable defined in the shape supplied by HOPEX.
5. In the Properties tab, click New to create a new DiagramTypeProperty. Give it the same name as the MetaPicture.
6. In the DiagramTypeProperty Properties window, Characteristics tab, select the MetaAttribute to be displayed (in this case, Name).
7. Click OK to close all dialog boxes.
Field limit
Do not add more than 12 DiagramTypeFields in a DiagramTypeObject.
If you need more than 12 DiagramTypeFields, create as many DiagramTypeProperties as needed and group them in less than 12 DiagramTypeFields.