Skip to main content
13-Aquamarine
June 15, 2022
Solved

How to programatically add a document to attachments section?

  • June 15, 2022
  • 1 reply
  • 2079 views

Hi, 

I have written code which generates a report and downloads the file once an action has been clicked. I want to upload that document to the attachments section of change notice or change activity depending on where that action was triggered from. Is there an API to upload the generated report directly to this section?

 

Thanks.

Best answer by RandyJones

@WM_9965332 wrote:

Hi, 

I have written code which generates a report and downloads the file once an action has been clicked. I want to upload that document to the attachments section of change notice or change activity depending on where that action was triggered from. Is there an API to upload the generated report directly to this section?

 

Thanks.


Take a look at this article:

https://www.ptc.com/en/support/article/cs329385

How to create a Change Notice and add attachment to it using API in Windchill PDMLink

1 reply

20-Turquoise
June 15, 2022

@WM_9965332 wrote:

Hi, 

I have written code which generates a report and downloads the file once an action has been clicked. I want to upload that document to the attachments section of change notice or change activity depending on where that action was triggered from. Is there an API to upload the generated report directly to this section?

 

Thanks.


Take a look at this article:

https://www.ptc.com/en/support/article/cs329385

How to create a Change Notice and add attachment to it using API in Windchill PDMLink

13-Aquamarine
June 23, 2022

Thanks for pointing me to this. How can I check if there is already a document in attachments section and override instead of adding to it again?

20-Turquoise
June 24, 2022

@WM_9965332 wrote:

Thanks for pointing me to this. How can I check if there is already a document in attachments section and override instead of adding to it again?


Take a look at this article:

https://www.ptc.com/en/support/article/cs237668

How to update Primary Content/Secondary Content of WTDocument with customization code in Windchill PDMLink