Create LibreOffice document
The action creates a LibreOffice (LibreOffice) document based on a LibreOffice template. Document templates are searched in the folder set in Options.Documentation.Templates . Depending on the document type for which the document is to be created, different document templates have to be provided.
- TopicsDocu.odt - Terminus themes topic documentation ( HierarchyTopic )
- TerminologyModel.odt - Terminology model documentation for projects ( ODC_Project ), modules ( ODC_Module ), classes ( ODC_ImpClass ), complex data types ( SDB_Structure ) and enumerations.
- ReferenceDocu.odt - Reference documentation for projects ( ODC_Project ), modules ( ODC_Module ), classes ( ODC_ImpClass ), complex data types ( SDB_Structure ) and enumerations ( SDB_ValueList )
The first two documentations claim to be conceptual documentations. Reference documentations are technical ones. Usually, templates are installed with ODABA and provided in the template folder in the ODABA installation directory (MS Windows) or in /usr(share/odaba/template (Linux). When templates are not available there, they might be downloaded from When the templates option is not set, the action tries to locate the template in the default template folder.
www.odaba.com/content/downloads/demos/DocumentTemplates.zip
Before calling document generating actions check that the templates are provided in the folder referenced in Templates option. Documents work for the classes mentioned above. The instance to be documented has to be referenced as option ItemName in the document template, which will be set properly by the function calling the template (e.g. pc_base ::CreateDocument_odt_call() ).
Libre Office generation may be executed within the current process ( ClassEditor or Terminus ) or in a separate process. A separate process will be started, when Options.Documentation.ExecuteProgram has been set to YES or true )
The folder for generated document files has to be passed in option Options.Documentation.DocumentTarget . Template name and document name (topic name) have to be passed to the standard implementation.
When running Libre Office generation from ClassEditor or Terminus by calling the appropriate document action, proper option values will be set before calling the document template. When running document generation in another process ExecuteProgram= YES ), a configuration (ini) file will be written to the directory containing the template. A similar configuration file is required when calling CreateDocument from a command line.
Details for the options to be passed in the ini-file are described in the ODABA User's Guide ( Generating Document ).
// ini-file for calling CreateDocument
[SYSTEM]
DICTIONARY=L:\adk\ode.sys
[CreateDocument]
DICTIONARY=L:\adk\ode.sys
RESOURCES=L:\adk\ode.dev
DATABASE=L:\opa\opa.dev
ONLINE_VERSION=YES
ACCESS_MODE=Write
NET=YES
ODABA_ROOT=L:\odet\
CTXI_DLL=AdkCtxi
TRACE=e:\temp\reinhard
DSC_Language=English
Collection=HierarchyTopic
ItemName=Application Logic Interface
DocumentPath=l:\opa\doc\Application Logic Interface.odt
TemplatePath=l:\opa\tpl\TopicsDocu.odt
In order to debug document templates one may set Options.Documentation.TemplateOutput . The option refers to a directory, to which the generated OSI template file generated from the document template will be stored using the template name extended by .osi . After a proper configuration file has been provided or generated, one may add the OSI_DEBUG=YES option to the [CreateDocument] section. When calling CreateDocument with the modified ini-file, the document generation stops before executing the first template statement.
More details for the trouble shooting are described in the ODABA User's Guide ( Generating Document ).
// calling Create document from a command line:
// just pass the generated ini-file to CreateDocument
// command line utility (in odaba installation folder)
// the name of the ini-file is the document template name
...CreateDocument.exe /usr/share/template/ReferenceDocu.ini (Linux)
...CreateDocument.exe .../odaba/template/ReferenceDocu.ini (Windows)