Article - CS348518

How to create a Copy of PDF viewable file from the Representation of WTDocument in the Secondary Content table as Attachment using the WVS Afterloader hook method

Modified: 21-Oct-2021   

Applies To

  • Windchill PDMLink 11.1 to 12.0
  • Visualization Services (WVS)


  • This is an example of the WVS Afterloader hook method to create a Copy of PDF viewable file from the representation of WTDocument in the secondary content table as attachment.
    • After the EDRLoader successfully creates a new representation, a custom method can be called to perform additional work.
    • For example, setting ad hoc permissions on the new representation. Refer to the publish.afterloadermethod property definition in the file in your Windchill installation for more details.
    • This article provides sample code for this hook that will enable you to create a Copy of PDF viewable file from the representation of WTDocument in the secondary content table as attachment.
  • Two key elements to know about this implementation before deploying in your system:
    • The sample code in this article is designed to work with WTDocument only. For EPMDocument, refer to CS216668
    • After implementing this article, upon Check-In, Upload and Manual Representation Creation events, WTDocuments are filtered by their ContentRoleType and only Primary content will be published to make sure the Secondary Attachments are not published. Refer to CS52443 for more information.
  • Sample implementation with screenshots
    • Creates a Copy of PDF viewable file as WTDocument attachment. The output PDF file name will be source file name + Windchill version number. i.e. Format: <source file name>_<IterationInfo>.pdf (e.g. MYDOCNAME_A.1.pdf)
    • For Example)
      • Primary Content and Attachments

      • Representations/Annotations table
This is a PDF version of Article CS348518 and may be out of date. For the latest version click