Customizing the metamodel > Symbols: Creating and modifying > Depicting a symbol with an image > Syntax of the depictions clause
  
Syntax of the depictions clause
DEPICTIONS { DIAGRAM RETAIN STYLE depiction-file }
and/or
DEPICTIONS { MENU depiction-file }
depiction-file is the name and full path of a bitmap or a metafile.
Alternatively, you can write:
DEPICTIONS { DIAGRAM RETAIN STYLE depiction-file MENU depiction-file }
The Diagram clause specifies which image file to use for the toolbar and which to use on the Diagram.
For the Menu, you can only use bitmap files. If a metafile is used for the menu, a warning is given:
This version of System Architect does not Support metafiles as menu depictions – ignored
You can still add these as buttons to the menu, but they appear in text form only.
For the Diagram, you can use either a bitmap or metafile.
There is an exception to this in the depiction of line symbols, where only the Menu clause applies. You cannot use the DEPICTIONS statement to specify the way a line symbol should look on the diagram workspace; you can use the Menu clause only to tell System Architect how to represent the line symbol on the Draw menu or toolbox. You can, however, use DEPICT LIKE to specify to some degree how lines should look on the diagram: see Depicting line symbols.
Note Pictures in the Draw menu and toolbox in System Architect are 16 x 16 bits. If your pictures are bigger than this, the System Architect menu and toolbox increase in size.
Example
The following example creates a new diagram type called “my_new_diagram”, creates a new symbol type called “my_new_symbol”, assigns the new symbol to the new diagram, and then specifies that the new symbol should be depicted with two bitmaps, one for the way the symbol looks on the diagram workspace (“my_picture_for_workspace.bmp”) and one for the Draw menu and toolbox in the diagram (“my_picture_for_toolbox.bmp”). The pictures are both in the “my_encyclopedia” directory.
RENAME Diagram "User 1" To "my_new_diagram"
RENAME Symbol "User 1" To "my_new_symbol"
ASSIGN "my_new_symbol" To "my_new_diagram"
SYMBOL "my_new_symbol"
{
DEPICTIONS
{ DIAGRAM RETAIN STYLE "C:\Program Files\UNICOM Systems\System Architect\Encyclopedias\my_encyclopedia\my_picture_for_workspace.bmp"
}
DEPICTIONS
{ Menu "C:\Program Files\UNICOM Systems\System Architect\Encyclopedias\my_encyclopedia\my_picture_for_toolbox.bmp"
}
}
See also
Depicting a symbol with an image