CATRule to Specify Output Type and Directory

Using a CATRule, you can specify whether to extract your work instructions in a specific output type. Such as XML or HTML, and you can specify the output directory. This rule is called on when you use either Generate Documentation for Operation or Generate Documentation for All Operations from the Instructions Tools section of the action bar.

This page discusses:

General Information

The DELWIDocGen_GeneralCusto.CATRule is located in ..\resources\knowledge\scripts and can be invoked when you use either Generate Documentation for Operation or Generate Documentation for All Operations from the Instructions Tools section of the action bar. If you choose XML, you can use DELWIDocGen_PostProcessOutput.CATRule to customize the XML output.

Output Arguments

You select an integer between 1 and 3 to determine the output type; you provide a string to specify the output directory.

  • Output Type Description
    OutputTypeInt 1 Generate standard HTML
    2 Generate XML
    3 Displays a dialog box asking the user to select either HTML or "Custom Output" (XML)
    ActiveSystemOrGenOperation ProdSystemOccurrence The currently active System / General Operation (on which Generate Documentation is launched today)
    ListGenerateDocumentationForObjects List of ProdSystemOccurrence List of objects on which Generate Documentation needs to be launched.

    This list can contain either

    • The active System / General Operation OR
    • One/more of the children of the active System / General Operation
      Note: Note: The children do not have to be direct/immediate children; they could be deep down in the tree under the activeSystem / General Operation
    Value of this is set to the input value (ActiveSystemOrGenOperation) in the default BL.

    SuppressFormatAndAttributesDialog Boolean TRUE/FALSE
  • OutputDirectoryStr corresponds to the context object.

Sample

The first example shows work instructions output in HTML. Because no output directory specifies, the output directory is CATTemp. The second example shows how to generate a dialog box that asks the user whether the output would be in HTML or XML. In this case, the output generates to D:\NoSave\Project_OutputDir.

let OutputTypeInt(Integer)
let OutputDirectoryStr(String)
OutputTypeInt = 1 /* default value */

OutputTypeInt = 3 
OutputDirectoryStr = "D:\NoSave\Project_OutputDir"
let SuppressFormatAttrDlgBool(Boolean)
SuppressFormatAttrDlgBool = false /* Default value */

SuppressFormatAttrDlgBool = true
Parameters->SetAttributeBoolean("SuppressFormatAndAttributesDialog", SuppressFormatAttrDlgBool)