In this package we provide an example of a Model Type GraphRep showing a watermark. The watermark is defined in the model type's notebook (in our case "created by ADOxx.org"):
DownloadsThe files below contain an example library (Watermark.abl) and an example model (Watermark sample model.adl). A step-by-step configuration guide is presented in the Hands-On section below. It completely describes how to build this example library.
Watermark.ablWatermark sample model.adlHands-On
1) Create new class __ModelTypeMetaData__
Steps to create class __ModelTypeMetaData__- Go to the Library management, select a dynamic library and click Class hierarchy.
- Click View and select Metamodel.
- Select __D-construct__ (Metamodel)
- Click New --> New class; name it __ModelTypeMetaData__ (two underscore signs!).
2) Add new attributes to class __ModelTypeMetaData__
![](http://www.adoxx.org/live/documents/10157/86613/02_new_attributes_to_MTMD.png/1bce77a9-32e5-433e-a427-b9109e63965a?t=1395407969217)
Steps to add attributes to class __ModelTypeMetaData__:
- Select class __ModelTypeMetaData__
- Click New --> New attribute...
- Name new attributes and select type according figure above: (1) name: Watermark GraphRep, type: Longstring (2) name: Watermark AttrRep, type: Longstring (3) name: Watermark, type: String.
3) Configure Watermark AttrRep attribute![](http://www.adoxx.org/live/documents/10157/86613/03_conf_wm_attrrep.png/ea4045ca-3f2a-492e-a896-c2033d8a0baf?t=1395408284507)
- Double click Watermark AttrRep attribute, set Standard value to:
1CHAPTER "Watermark"
2ATTR "Watermark"
4) Configure Watermark GraphRep attribute![](http://www.adoxx.org/live/documents/10157/86613/03_conf_wm_attrrep.png/ea4045ca-3f2a-492e-a896-c2033d8a0baf?t=1395408284507)
- Double click Watermark GraphRep attribute, set Standard value to:
1GRAPHREP layer:-3
2FONT "Arial" h: (40pt) style: bold color: lightgray line-orientation: 45
3ATTR "Watermark" x: (w/2) y: (h/2) w:c h:c
5) Define Model type![](http://www.adoxx.org/live/documents/10157/86613/05_wm_MT.png/0416a872-ea59-4f3b-9c40-1c9e29d83b35?t=1395408729413)
- Go back to the Library management and select your current Dynamic Library.
- Click Library attributes… --> Add-ons and define the following model type according the figure above:
1MODELTYPE "Watermark Sample" from:none plural:"Watermark Samples" pos:0 not-simulateable bitmap:"db:\\sample.bmp" graphrep: "Watermark GraphRep" attrrep: "Watermark AttrRep"
ResultIn order to see the result, open
Watermark sample model.adl in the ADOxx Modeling Toolkit.
How to open the model type's notebook: - Right click on modelling area and click Model attributes
- alternatively press Alt+Enter.
![](http://www.adoxx.org/live/documents/10157/86613/06_open_MT_notebook.png/4d8976d5-6828-4ca0-9555-6c4fdeeba467?t=1395409096763)