« Back to Documentation

Documentation RTF: Sample Implementation

Combination View Flat View Tree View
Threads [ Previous | Next ]
Documentation RTF: Sample Implementation
community documentation transformation core transformation adoscript
Answer
3/27/14 12:22 PM
A sample implementation for an RTF generation can be found below. The elements to be considered are:
1. Library attribute "Configuration of documentation"
2. DSL transformation files as part of the library (attached to this post)
3. AdoScript file that is called from the EXPORT block for additional actions (attached to this post

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.

Library attribute (EXPORT block)
 1EXPORT "WORD generation"
 2smarticon:rtf
 3visible:0
 4menuname: "RTF generation..."
 5filedescription: "RTF files"
 6fileextension: "*.rtf"
 7filename:attribute: "filename"
 8temp1: "tempfilename"
 9requirefile1:"db:\\dummy_implrtf.dsl"
10requirefile2:"db:\\dummyrtf.dsl"
11requirefile3:"db:\\ado_utl.dsl"
12
13SOURCE "Model2SGML"
14filename:attribute: "tempfilename"
15basename:attribute: "filename"
16libraryspecific:0
17modeltypes:"Security Model"
18subprocesses:0
19
20LIBRARY
21graphics:1
22gfxformat:"bmp24"
23gfxdpi:96.000000
24gfxmode:"do not change"
25gfxorientation:"do not change"
26gfxlayout:"do not split graphic files"
27gfxscale:100
28gfxdozoom:0
29
30SOURCE "ModelGroups"
31filename:attribute:"tempfilename"
32exportall:1
33
34SOURCE "AdoScript"
35name: "Jade Converter"
36var1:attribute: "tempfilename"
37var2:attribute: "filename"
38var3:attribute: "homedir"
39{
40  # set this variables to hand over to the ASC and implement then there.
41  SETG homedir: (homedir)
42  SETG filename: (filename)
43  SETG tempfilename: (tempfilename)
44  EXECUTE file: (sAdoScriptPath + "exportRTF.asc")
45}
Attachments: ado_utl.dsl (12.1k), dummy_implrtf.dsl (49.0k), dummyrtf.dsl (0.4k), exportRTF.asc (0.2k)