Skip to main content
1-Visitor
April 4, 2021
Question

Publish PDF to drawing content as attachement

  • April 4, 2021
  • 2 replies
  • 4572 views

Hello Guys,

 

I have gone through most of the existing posts regarding this topic. Unfortunately I didn't find any answer matching my needs. I am new to windchill customization. We would like to publish only PDF after the drawings are released with promotion request. 

 

I have managed to publish PDF to a WTdocument with AdditionalFilesPostPublishDelegate. However, I would like to auto publish pdf to drawing content as attachment instead of WTdocument.

 

I was also wondering how do other companies manage dxf files for laser cutting in windchill? Drawing DXF file created through auto publishing are useless for us as we can't feed that directly to machine. Also dxf scalling would be a issue. 

 

Attached publish rule xml file.

 

Thanks in advance

SV

2 replies

16-Pearl
April 4, 2021

Hello SV,

 

We have achieved the same through customization. I will give you some pointers to achieve this. 

Please change publish.afterloadermethod property of wvs.properties to point to your class. 

When you have custom class file , please use the APIs given by PTC to attach pdf to attachment table. 

 

For DXF file , my colleague can help.  

 

Thanks and Regards

Ajit

1-Visitor
April 6, 2021

Hi Ajit,

 

Thanks for your swift response.

 

You mean something like below in site.xconf 

   <Property name="publish.afterloadermethod" overridable="true" targetFile="codebase/WEB-INF/conf/wvs.properties" value="com.ptc.wvs.util.AfterEDRloader/copyToEPM"/>

16-Pearl
April 6, 2021

Yes, you got that exactly right , but the Java class will be the custom one. I can demo the working if you would like to you.

  
Regards

Ajit

18-Opal
April 21, 2021

Not sure if this ever got resolved but do you want to reuse the published pdf (the same pdf file is reference as the EPMDocument's representation and the its attachment) or copy the pdf and then use the copied pdf as the attachment.

 

Either way is doable.

1-Visitor
April 22, 2021

Hello Graham,

 

I am looking to use auto publisher which will give us pdf as attachment. Refer attached image

 

Also if possible, pdf should have revision no. mentioned before extension.
Eg. 0000254REVX-.pdf

 

Thanks

 

PDF as attachment.png

18-Opal
April 23, 2021

SV,

 

By "auto publish" do you mean by using publishing rules?

 

Anyway, I got this working including the REV in the attachment's filename.

In this example I reuse the pdf created by publishing and then simply connect it to the EPMDocument as an attachment with the the desired filename.

All done automatically upon publishing.

d_graham_0-1619186446104.png

 

David