Documentation RTF: Sample ImplementationDocumentation RTF: Sample ImplementationDocumentation RTF: Sample ImplementationWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=187272014-03-27T12:22:07Z2013-04-11T19:31:52ZA sample implementation for an RTF generation can be found below. The elements to be considered are:<br />1. Library attribute "Configuration of documentation"<br />2. DSL transformation files as part of the library (attached to this post)<br />3. AdoScript file that is called from the EXPORT block for additional actions (attached to this post<br /><br />The RTF format does not support images per-se, the model image is generated as well and can be included when opening the RTF in Microsoft Word, selecting all text (CTRL + A) and pressing F9. This file can then be saved in DOC format.<br /><br />Library attribute (EXPORT block)<br /><div class="code"><span class="code-lines"> 1</span>EXPORT "WORD generation"<br /><span class="code-lines"> 2</span>smarticon:rtf<br /><span class="code-lines"> 3</span>visible:0<br /><span class="code-lines"> 4</span>menuname: "RTF generation..."<br /><span class="code-lines"> 5</span>filedescription: "RTF files"<br /><span class="code-lines"> 6</span>fileextension: "*.rtf"<br /><span class="code-lines"> 7</span>filename:attribute: "filename"<br /><span class="code-lines"> 8</span>temp1: "tempfilename"<br /><span class="code-lines"> 9</span>requirefile1:"db:\\dummy_implrtf.dsl"<br /><span class="code-lines">10</span>requirefile2:"db:\\dummyrtf.dsl"<br /><span class="code-lines">11</span>requirefile3:"db:\\ado_utl.dsl"<br /><span class="code-lines">12</span><br /><span class="code-lines">13</span>SOURCE "Model2SGML"<br /><span class="code-lines">14</span>filename:attribute: "tempfilename"<br /><span class="code-lines">15</span>basename:attribute: "filename"<br /><span class="code-lines">16</span>libraryspecific:0<br /><span class="code-lines">17</span>modeltypes:"Security Model"<br /><span class="code-lines">18</span>subprocesses:0<br /><span class="code-lines">19</span><br /><span class="code-lines">20</span>LIBRARY<br /><span class="code-lines">21</span>graphics:1<br /><span class="code-lines">22</span>gfxformat:"bmp24"<br /><span class="code-lines">23</span>gfxdpi:96.000000<br /><span class="code-lines">24</span>gfxmode:"do not change"<br /><span class="code-lines">25</span>gfxorientation:"do not change"<br /><span class="code-lines">26</span>gfxlayout:"do not split graphic files"<br /><span class="code-lines">27</span>gfxscale:100<br /><span class="code-lines">28</span>gfxdozoom:0<br /><span class="code-lines">29</span><br /><span class="code-lines">30</span>SOURCE "ModelGroups"<br /><span class="code-lines">31</span>filename:attribute:"tempfilename"<br /><span class="code-lines">32</span>exportall:1<br /><span class="code-lines">33</span><br /><span class="code-lines">34</span>SOURCE "AdoScript"<br /><span class="code-lines">35</span>name: "Jade Converter"<br /><span class="code-lines">36</span>var1:attribute: "tempfilename"<br /><span class="code-lines">37</span>var2:attribute: "filename"<br /><span class="code-lines">38</span>var3:attribute: "homedir"<br /><span class="code-lines">39</span>{<br /><span class="code-lines">40</span> # set this variables to hand over to the ASC and implement then there.<br /><span class="code-lines">41</span> SETG homedir: (homedir)<br /><span class="code-lines">42</span> SETG filename: (filename)<br /><span class="code-lines">43</span> SETG tempfilename: (tempfilename)<br /><span class="code-lines">44</span> EXECUTE file: (sAdoScriptPath + "exportRTF.asc")<br /><span class="code-lines">45</span>}<br /></div>Wilfrid Utz2013-04-11T19:31:52Z