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:

  • AttachDocumentation

    The valid values are:

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

  • AttachmentType can be one of three values:
    Value Attaches Notes
    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 VPM 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.

Example

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

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