@INCLUDE with variables@INCLUDE with variablesRE: @INCLUDE with variablesMateusz Dziedzichttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=10764422017-12-11T10:41:33Z2017-12-11T10:40:54Z„The idea is to add a small pice of GraphRep at each child-classes. The main part is equal. “<br /><br />For the main part one could save the GraphRep code in a .leo file in the database. Than include the main part via @INCLUDE "db:\\MainPart_GraphRep.leo" in the GraphRep Attribute of each class. After the @INCLUDE statement one could add additional code in the child-classes.Mateusz Dziedzic2017-12-11T10:40:54Z@INCLUDE with variablesSwantehttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5088482016-04-04T07:59:39Z2016-04-04T07:36:17ZHello,<br /><br />I want to use a GraphRep for multiple classes. So I add the complete GraphRep into "file.asc".<br />I add some global variables in the AppInitalized Event<div class="code"><span class="code-lines"> 1</span>CC "Core" GET_CLASS_ID classname:("__ModelTypeMetaData__")<br /><span class="code-lines"> 2</span> #--> RESULT ecode:intValue classid:intValue<br /><span class="code-lines"> 3</span><br /><span class="code-lines"> 4</span> SETL debug:("Yes")<br /><span class="code-lines"> 5</span> IF (debug = "Yes") {<br /><span class="code-lines"> 6</span> SETG skriptPath:("C:\\<my_path>\\")<br /><span class="code-lines"> 7</span> }<br /><span class="code-lines"> 8</span> ELSE {<br /><span class="code-lines"> 9</span> SETG skriptPath:("db:\\")<br /><span class="code-lines">10</span> }<br /><span class="code-lines">11</span> CC "Core" SET_ATTR_VAL objid:(classid) attrname:("Script path (source)") val:(skriptPath)<br /></div><br />I tested:<br /><br />doesn't work ("Script path" is a reference in __D-construct__ )<div class="code"><span class="code-lines">1</span>GRAPHREP layer:-2 sizing:asymmetrical<br /><span class="code-lines">2</span>AVAL scriptPath:"Script path"<br /><span class="code-lines">3</span>@INCLUDE (scriptPath+"file.asc")<br /></div><br />doesn't work<br /><div class="code"><span class="code-lines">1</span>GRAPHREP layer:-2 sizing:asymmetrical<br /><span class="code-lines">2</span>SET scriptName:"C:\\<my_path>\\file.asc"<br /><span class="code-lines">3</span>@INCLUDE (scriptName)<br /></div><br />works - but this is useless<br /><div class="code"><span class="code-lines">1</span>GRAPHREP layer:-2 sizing:asymmetrical<br /><span class="code-lines">2</span>@INCLUDE ("C:\\<my_path>\\file.asc")<br /></div><br />Is there any trick to fix this?<br /><br />Edit:<br />The idea is to add a small pice of GraphRep at each child-classes. The main part is equal.<br /><br />Greetings<br />SwanteSwante2016-04-04T07:36:17Z