Watermark Model Type GraphRepWatermark Model Type GraphRepWatermark Model Type GraphRepSabin Popescuhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=872162014-03-28T08:04:05Z2014-03-17T13:44:09Z<strong></strong>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"):<br /><br /><br /><img src="http://www.adoxx.org/live/documents/10157/86613/watermark_preview.png/a991569d-76e3-4d6a-9ece-17a848e8067d?t=1395132659570" /><br /><br /><span style="font-size: 18px"><strong>Downloads</strong></span><br /><br />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.<br /><br /><a href="http://www.adoxx.org/live/documents/10157/86613/Watermark.abl/81ae61d7-812f-435b-9327-a78edd2bf4a8">Watermark.abl</a><br /><a href="http://www.adoxx.org/live/documents/10157/86613/Watermark+sample+model.adl/6c6eedcc-75d4-4e48-ad6a-fcd352f3dbb2">Watermark sample model.adl</a><br /><br /><br /><strong><span style="font-size: 18px">Hands-On</span></strong><br /><strong><br />1) Create new class __ModelTypeMetaData__</strong><br /><br /><img src="http://www.adoxx.org/live/documents/10157/86613/01_new_class_MTMD.png/75c2c758-65b0-4ce3-9571-9569d5f2c0a9?t=1395407539767" /><br /><br /><strong>Steps to create class <em>__ModelTypeMetaData__</em></strong><ul style="list-style: disc inside;"><li>Go to the Library management, select a dynamic library and click <em>Class hierarchy</em>.</li><li>Click <em>View</em> and select <em>Metamodel</em>.</li><li>Select <em>__D-construct__ (Metamodel)</em></li><li>Click <em>New</em> --> <em>New class</em>; name it <em>__ModelTypeMetaData__</em> (two underscore signs!).</li></ul style="list-style: disc inside;"><strong><br />2) Add new attributes to class __ModelTypeMetaData__<br /><br /><img src="http://www.adoxx.org/live/documents/10157/86613/02_new_attributes_to_MTMD.png/1bce77a9-32e5-433e-a427-b9109e63965a?t=1395407969217" /><br /><strong>Steps to add attributes to class __ModelTypeMetaData__:</strong><br /></strong><ul style="list-style: disc inside;"><li>Select class <em>__ModelTypeMetaData__</em></li><li>Click <em>New</em> --> <em>New attribute...</em></li><li>Name new attributes and select type according figure above: (1) name: <em>Watermark GraphRep</em>, type: <em>Longstring</em> (2) name: <em>Watermark AttrRep</em>, type: <em>Longstring</em> (3) name:<em> Watermark</em>, type: <em>String</em>.</li></ul style="list-style: disc inside;"><strong>3) Configure Watermark AttrRep attribute</strong><br /><br /><img src="http://www.adoxx.org/live/documents/10157/86613/03_conf_wm_attrrep.png/ea4045ca-3f2a-492e-a896-c2033d8a0baf?t=1395408284507" /><br /><ul style="list-style: disc inside;"><li>Double click <em>Watermark AttrRep</em> attribute, set <em>Standard value</em> to:</li></ul style="list-style: disc inside;"><div class="code"><span class="code-lines">1</span>CHAPTER "Watermark"<br /><span class="code-lines">2</span>ATTR "Watermark"<br /></div><strong><br /><br />4) Configure Watermark GraphRep attribute</strong><br /><br /><img src="http://www.adoxx.org/live/documents/10157/86613/03_conf_wm_attrrep.png/ea4045ca-3f2a-492e-a896-c2033d8a0baf?t=1395408284507" /><br /><ul style="list-style: disc inside;"><li>Double click <em>Watermark GraphRep</em> attribute, set <em>Standard value</em> to:</li></ul style="list-style: disc inside;"><div class="code"><span class="code-lines">1</span>GRAPHREP layer:-3<br /><span class="code-lines">2</span>FONT "Arial" h: (40pt) style: bold color: lightgray line-orientation: 45<br /><span class="code-lines">3</span>ATTR "Watermark" x: (w/2) y: (h/2) w:c h:c<br /></div><strong><br />5) Define Model type</strong><br /><br /><img src="http://www.adoxx.org/live/documents/10157/86613/05_wm_MT.png/0416a872-ea59-4f3b-9c40-1c9e29d83b35?t=1395408729413" /><br /><br /><ul style="list-style: disc inside;"><li>Go back to the <em>Library management</em> and select your current <em>Dynamic Library</em>.</li><li>Click <em>Library attributes…</em> --> <em>Add-ons</em> and define the following model type according the figure above:</li></ul style="list-style: disc inside;"><div class="code"><span class="code-lines">1</span>MODELTYPE "Watermark Sample" from:none plural:"Watermark Samples" pos:0 not-simulateable bitmap:"db:\\sample.bmp" graphrep: "Watermark GraphRep" attrrep: "Watermark AttrRep"</div><strong><span style="font-size: 18px"><br /><br />Result</span></strong><br /><br />In order to see the result, open <a href="http://www.adoxx.org/live/documents/10157/86613/Watermark+sample+model.adl/6c6eedcc-75d4-4e48-ad6a-fcd352f3dbb2">Watermark sample model.adl</a> in the ADOxx Modeling Toolkit. <br /><br /><strong>How to open the model type's notebook: </strong><ul style="list-style: disc inside;"><li>Right click on modelling area and click Model attributes</li><li>alternatively press Alt+Enter.</li></ul style="list-style: disc inside;"><img src="http://www.adoxx.org/live/documents/10157/86613/06_open_MT_notebook.png/4d8976d5-6828-4ca0-9555-6c4fdeeba467?t=1395409096763" /><br /><strong><br /></strong>Sabin Popescu2014-03-17T13:44:09Z