September 8, 2009

Graphics in BiZZdesigner 9.1.x and up

Good visualizations of models are essential in communication. I'm currently working in a multi-disciplinary project. One of my tasks is to write process models. Unfortunately, models are becoming increasingly complex (I hope to be able to simplify them again soon) so I was looking for a way to make some things a little more clear by adding visual effects to the BiZZdesigner models.

One of the things I wanted to do is to change the icons of triggers that are time-related to a clock. In the 9.1.0 version I found the following solution:

step 1: preparations
First, create a profiles-folder ...\BiZZdesigner-profiles. The documentation explains that this folder should contain an nls folder which, in turn, should contain folders named nl and eng.

step 2: TimeTrigger.mpd
In your profiles folder, create a TimeTrigger.mpd file with the following content:
PROFILE TimeTrigger {
assignable to Trigger;

string Documentation;
};
the documentation is not strictly necessary but seemed like a good idea.

step 3: editorsettings.mpd
Locate your BiZZdesign installation directory (usually in c:\ProgramFiles) and copy the editorsettings.mpd file from the data subdirectory to your profiles directory. Change the line
HIDDEN PROFILE EditorSettings{
to
HIDDEN PROFILE MySettings extends EditorSettings{
now locate the section named "Hidden Presentations". Update this section to read:
// add visualisation of time-triggers
{ name:'TijdsTrigger',
font:{ nm:'Arial', pt:10, i:false, b:false, u:false },
foreground:{ R:0, G:0, B:0 },
background:{ R:255, G:255, B:255 },
iconfile:'Time.png' }
step 4: update the metamodel
From the local installation directory, copy the MetaModels folder to your profiles directory. Create the following directory structure in the Amber subfolder:
Amber\
..\Viewpoints\
..\data\
..\res\
..\nls\
..\en
..\nl
dump an image called Time.png in the folder named res. Make sure this file is not too big (I'm not sure yet what the maximum size is but I found out the hard way that this matters, a lot). Now you're basically done:

Step 5: test!
Fire up your BiZZdesigner application and make sure the profiles are loaded (check the application settings). Once they're loaded, create a trigger. In the properties, under profiles, select 'TimeTrigger" and watch the magic! Here's an example image of the result