REFERENCE:

DocGen and DocDesigner

When using the Documentation Designer to design custom documentation templates for Together Documentation Generator building block (DocGen), you have to reference the internal variables and functions to specify formulae expressions, and provide section flow control.


1. DG internal variables


  1. curItemNo

  2. curPropertyName

  3. curPropertyFullName

  4. curPropertyType

  5. curPropertyValue

  6. curPropertyInstance (RwiProperty)

  7. curPropertyInstance (value)

  8. curElement

  9. prevElement

  10. projectName

  11. nowDateTime

  12. includeDiagrams

  13. reportScope

  14. stockParam

When the DG (Documentation Generator) executes a template and generates a report,
it produces some specific internal information, which may be interesting to include in the report.

This information, for example, includes project name , current date/time etc.

Moreover, there are special internal temporary data that appear when DG executes
some particular parts of the template.

DG variables enable access to this information and it's insertion in the report.
Each variable has specific name and represents some particular kind of internal DG informaton available at any particular moment.

Internal variables are not all accessible at any instant. Most of them appear only in special areas or inside special sections.

DG variables belong to one of the following types:  String, RwiElement, RwiProperty.

Access to these variables is provided by appropriate functions in formula expressions:
getDGVariablegetDGRwiElement, getDGRwiProperty.
 
 

Variable

Possible Values

Availability

curItemNo : String

The current iteration item number (starting with 1)

 

inside any Iteration Section

curPropertyName : String

Name of the current property

 

inside Property Iterator

curPropertyFullName : String

Full name of the current property (specified in DG MetaModel File).

 

inside Property Iterator

curPropertyType : String

Type of the element property.

Since RWI-interface doesn't provide property types
they should be specified in DG MetaModel File

"string", for String property

"boolean", for boolean property

inside Property Iterator

curPropertyValue : String

value of the current property

 

inside Property Iterator

curPropertyInstance : RwiProperty

the RwiProperty object of the current property instance.

This variable is useful when it is necessary to get some subproperty of the current property instance.

For example:

Let the current model element be a class node and you need to list some information about all interfaces implemented by this class. Then you have to create a template section iterating by instances of IMPLEMENTS property of the current class element. After that, within iteration section you can use curPropertyInstance variable to access the subproperty REFERENCED_ELEMENT which allows to get all information about the implementing class.

Let one needs to get the full names of implemented interfaces. Then the required expression will be as follows:

findElement(getDGRwiProperty("curPropertyInstance")->
getSubproperty("$referencedElement"))->getProperty("$fullName")

See also DG functions:
getDGRwiProperty, getSubproperty, findElement,getProperty

 

inside Property Iterator
while iterating by instances
of the specified property

curPropertyInstance : String

value of the the current property instance

 

the same

curElement  : RwiElement

the current model element

 

inside Element Iterator

prevElement  : RwiElement

previous element in the current iteration scope.

null, if it is the beginning of the scope

inside Element Iterator

projectName : String

The Project name

 

in report / page
header / footer areas

nowDateTime  : String

The current date/time

 

in page header / footer areas

includeDiagrams  : String

shows if the diagram charts should be included into the report

"yes" / "no"

in any place

reportScope  : String

shows the specified report scope

"all_model" - the scope is the whole model

"current_package" - the scope is the current package only

"current_package_recursive" the scope is the current package with subpackages

"current_diagram" - the scope is the current diagram only

in any place

stockParam  : String

parameter of the stock section call

 

inside stock sections