Generating documents outside ODE
All defined document types might be generated from command line, as well. Running document generation requires configuration or ini-files, which have to be passed to the program or to be stored on agreed locations. Generating documents outside ODE is more flexible, since it allows defining documents for any kind of object type. Thus, documents might also be generated from within applications by calling document actions similar as from within ODE.
The way document generators are called depend on the document type. While MS Word generation requires an external program call, LibreOffice and HTML generation may be called directly.
All default documents require Collection and ItemName or ItemLoid option values, which are referred to within the document template. When updating default templates, other options might be used instead, but those will not be set by the ODE document generation interface.
In order to use these document generating actions in other applications, one has to implement appropriate action handlers in the context class of the control displaying the root object instance to be printed. Fragments for action handlers are shown in the following sub topics. The functions for document actions in Terminus and ClassEditor are implemented in cThesaTree and cClassEDTree. (...odaba/src/src/gui/adk/adk/ToolsBase/Designer/qlib) as ExportToHtml(), ExportToLO() and ExportToWord().
More details for calling document generation features from within an application program are described in "Calling document generation from within an application program".
The templates for generating HTML provided by ODE might be considered as example for OSI template generation, which could be replaced by any other kind of OSI functions. Thus, starting HTML generation is nothing more than calling an OSI template. Since HTML templates can be called directly with a (selected) property handle. No instance identifier need to be passed.
Since HTML documents usually consist of more than one file, instead of a document path a kind of document root is required. When generating ODE HTML documents (VOID::HTMLProvideDocFolder()), the document folder has to be set in option variable Options.Documentation.DocumentTarget.
The example below shows a simple fragment for calling ODE HTML generation.