CATRule to Attach Documents to a System

Using a CATRule, you can specify whether to attach documents to a parent system and what types of output would attach. 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_AttachDoc.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.

Input Output Argument

The document's name is the input argument AttachDocumentName. It is a string. It can modify and sent back as an output argument.

Output Arguments

You can use the following output arguments:

Output Type Description Notes
AttachDocumentation false, no attachment required

true, attachment required. If requiring an attachment, the AttachmentType attribute must also have a value.

AttachmentType

1 Standard HTML output

If HTML attaches, then the document contains multiple files:
  • The HTML file
  • The image files (PNG) corresponding to views of the operations
  • Files from CBP or Engineering Documents associated with text work instructions.

2 Attach custom output (if custom output was generated postprocessing)

If the custom output attaches, then only one file attaches: the generated custom PDF or other file.

3 Attach both types of output (HTML and custom)

If both attach, then all files associated with HTML plus the custom output attaches.
CreateNewDocumentRevision Boolean Flag to indicate if new revision needs to be created (old revision will be detached in this case). Value set to FALSE in default BL
UserMessage String Message to be displayed Value set to empty in default BL
ListAdditionalFilesToAttach List of String Specifies the additional files to be included in the attached document.
CustomDocumentType String

The type of document to be created.

This output argument is not set in the default BL (Customer will need to add the relevant code to the BL).

ListDocumentAttributes List

This is a list of sub lists. Each sub list contains a pair of attribute name + attribute value). This output argument is not set in the default BL (You need to add the relevant code to the BL).

Example

The example shows the name of the document customizing, so AttachDocumentName modifies.

DefaultAttachDocumentNameStr = Parameters->GetAttributeString("AttachDocumentName")				
CustomizedAttachDocumentNameStr = DefaultAttachDocumentNameStr + "ForShopFloor"