ATC: ATTACH ASSEMBLE

ATC: ATTACH ASSEMBLE options 

This command assembles all attachments that are flagged as Incl=Assemble (on the document’s Attachment tab) and attaches that assembled PDF file to the target document.

options are optional.  There are several options that can be used singularly or together, separated by spaces.

  • SEQ n is optional.  It indicates a route sequence number.    If specified, the ATTACH ASSEMBLE command is ignored until the sequence is reached, then the output from that specific sequence is gathered.  Without a specified sequence, the most recent assembled output is used.
  • AS [attachment-name]; is optional. It specifies the name to be given to the new PDF file, assembled from the eligible attachments. Square brackets are required only if spaces are included in the filename. You can use bookmark-style placeholders, within square brackets, as part of the attachment name. You can use a variable previously assigned using ATC: SET.  The default is the Project ID followed by the template name followed by the document number and file type.  Avoid periods inside the file name; do not include a file extension.
  • LOCKED is optional, but is recommended.  When specified, all the attachments marked Assembled are change to Not Sent and any with Refresh Bookmarks enabled have the option cleared.
  • UI how is optional. It specifies whether the file should be shown on the Attachments tab.  How must be either Hidden or Visible. The default is Visible.

Example

ATC: EXIT HAS DocAttachedFile WITH FileName = 'TEST1.PDF';
ATC: ATTACH ASSEMBLE SEQ 3 as [TEST1.PDF]

The above example means “exit this script if the document has a file named TEST1.pdf, but if not, when the document gets to Seq 3 on the route, assemble all eligible attachments into one PDF file named TEST1.pdf and attach that PDF file to the document.”


Last updated: July 30, 2021 at 13:28 pm; green text = new