« Back to Scenario Collection

Watermark Model Type GraphRep

Combination View Flat View Tree View
Threads [ Previous | Next ]
Watermark Model Type GraphRep
scenario documentation modeltype graphrep
Answer
28/03/14 08:04
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"):




Downloads

The 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.abl
Watermark sample model.adl


Hands-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__


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


  • Double click Watermark AttrRep attribute, set Standard value to:
1CHAPTER "Watermark"
2ATTR "Watermark"


4) Configure Watermark GraphRep attribute



  • 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




  • 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"


Result


In 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.