You can depict a symbol with a bitmap (.bmp) or Windows Metafile (.wmf) that you supply. You can specify how a symbol is depicted on the diagram workspace and also how it is depicted in the toolbox and Draw menu, by adding a depictions clause to the symbols declaration, as follows:
The DIAGRAM command specifies the depiction file to be drawn on the diagram workspace. You can use a Windows Metafile (.WMF) for the DIAGRAM command because it is a vector image that will scale properly if you drag on its handlebars to increase or decrease it in size. You can also use .bmp files for the DIAGRAM command, but they do not scale well.
WMF files are vector files, which means that they store mathematical formulas about how an image should be displayed on a screen. One major benefit of this format is that it provides scalability without the loss of image quality. WMF files do not become jumbled or jagged as you zoom in or out on them.
The MENU command specifies the depiction file to appear on the toolbars, menus, and other areas. It is this graphic that you click to select a symbol to draw. For the toolbar, using bitmap images is best, since there is no need for them to scale. Usually, it is best to create a 16x16 pixel bitmap for each symbol that you want to represent in the toolbar.
BMP files are raster files, which means that they store information about each pixel on an image. Although bitmaps can render rich, photo-quality images, they become jumbled when you zoom in or jagged when we zoom out.
The <depiction-file> is the name and full path of a bitmap or a metafile. You can specify a directory outside your encyclopedia’s path, but it is advised to add the bitmaps and metafiles directly to the Files table of an encyclopedia’s database.
To retain the style of the symbol
When adding images to System Architect, retain the style of the image that you are using. This will maintain the original coloring and style of the symbol in the tool. The RETAIN STYLE keyword should also be added to the syntax of the depictions clause.
To add your own depiction files to an encyclopedia
1 Make the necessary changes to USRPROPS.TXT. An example for such code is:
RENAME DIAGRAM "User 1" TO "Wireless Communications" RENAME SYMBOL "User 1" TO "Satellite" SYMBOL "Satellite"{ASSIGN To "Wireless Network"DEPICTIONS { DIAGRAM satellite.wmf }DEPICTIONS { MENU satellite_toolbar.bmp } }
2 Import the .BMP and .WMF files into the encyclopedia’s FILES table.
You can either use System Architect's Encyclopedia File Manager (Tools, Encyclopedia File Manager), SAEM, or Microsoft Enterprise Manager to import your user-defined graphics files into the FILES table of the encyclopedia database. Encyclopedia File Manager can import one file at a time. If you have multiple graphics files, you can use SAEM to import the files into the FILES table.
The names of the files that you import should be consistent with your Usrprops.txt code. In the above example, we have used a relative path by not specifying any path at all: just listing satellite.wmf and satellite.bmp. This means that the depiction files should be imported directly into the Files table of the database.
You can follow an established convention in System Architect, and append the name of your depiction files with images/ to simulate that each depiction file is in an images subdirectory of the FILES table. If you use SAEM to import multiple files at a time, make sure that they are in a directory that is named images/, located anywhere on your computer. SAEM automatically append the name of all files imported from a directory named images with images/ at the front of each graphic’s file name. You can specify the images/ before the name of each depiction file in your USRPROPS.TXT, which would make the above example:
RENAME DIAGRAM "User 1" TO "Wireless Communications" RENAME SYMBOL "User 1" TO "Satellite" SYMBOL "Satellite" {ASSIGN To "Wireless Network" DEPICTIONS { DIAGRAM images\satellite.wmf } DEPICTIONS { MENU images\satellite_toolbar.bmp } }
There are two advantages to using this strategy. First, it provides a name independence and logical grouping strategy for user-specified images. Second, it is consistent with the way that images are handled when new encyclopedias are created: System Architect takes all graphics in the ..\System Architect\images directory, places them in the FILES table of the new encyclopedia, and gives them a name that is appended with images/.
The figure below shows the Files table of an encyclopedia’s database, on how the images/ prefix to depiction files provides a logical grouping of images.
3 Reopen the Encyclopedia for the changes to take effect.