cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Custom pdf partslist generation not possible using Windchill 12.0.2

SC_9493197
4-Participant

Custom pdf partslist generation not possible using Windchill 12.0.2

Dear all

It's wonderful to see all your inputs in these forums !

 

We have a Windchill change process where we need to generate custom partslist (BOM) in a pdf format with a predefined template (header , footer , logo etc).

 

Inspite of all the efforts(customization) from the team it still is not possible. (I know this is not an OOTB function from Windchill)

 

I reach out to all of you to seek your comments /suggestions

 

We are using Windchill 12.0.2 . 

 

Thank you in advance.

 

10 REPLIES 10

Hello @SC_9493197 

If there is custom function, that there is reason why it stops to work. Someone should find why. 

 

Usually there are some library changes between versions and it needs to be corrected. 

 

For example apache logging library has been changed between WCH11.1 and WCH 12.0 

 

All custom code needed to be check and corrected for new version

 

So your custom  function could need same care. 

 

PetrH 

Hello Petr

 

Thank you for your prompt response. we are doing a greenfield project on Windchill 12 and so no migration of codes . 

 

I don't think we have a solution to this yet (no custom solution)

 

hence i was trying to explore

 

 

 

Hi @SC_9493197 

I usually create some code to generate PDF based on own query and use Itext.

 

For different cases I use paid library to generate PDF from many different formats

the library is from www.aspose.com

You can manipulate almost with any file format you want thanks that library and also with very simple code .

It saved me hours and hours work

 

PetrH

This is the closest we came to your description. Its not PDF but normal Windchill page that the user can print to PDF. It still has some issues I am trying to work out, mainly WYSIWYG stuff where the column widths get funny when printed. It has a header and footer and is triggered from an action added to Reports on the Structure tab of a Part. Lots of unknowns in your description. Single or Multilevel? Are you applying any default config spec or filter?  Personally, I consider anything PDF to be for humans only and throw away. Its a nice to have but not true source once printed.  The major trick with this report was getting the BOM table to display fully, no matter how long it was. Windchill tables have a viewing window and a scrollbar so when printed, you only get what is in that window.

avillanueva_0-1699361099580.png

 

rleir
17-Peridot
(To:avillanueva)

Hi A, can you tell us how you do that please?

Hello  @avillanueva 

 

Thank you very much ! Our requirements are similar to what you point to . We generate the BOM with AML/AVL from the reports menu .

 

We however intend to export the same in a certain format due to mandatory requirements  and this is where the limitations hit us. Interestingly we use similar formats for CAD outputs using templates and that works fine.

 

SC_9493197_0-1699429907006.png

Thank you again for your response.

rleir
17-Peridot
(To:SC_9493197)

We use OpenPYXL to generate a custom format based on our xlsx template. Our python code launches a QueryBuilder report to get the data, then it inserts the data into the xlsx template.  

 

See my other post for info on running QB from a REST API.  Sorry, I am in a rush, the other post is about a year old.

 

We don't convert to PDF, but I suspect that is just another output step.

 

SC_9493197
4-Participant
(To:rleir)

@rleir 

 

Thank you , i will look into this one , this seems really interesting

 

 

rleir
17-Peridot
(To:rleir)

Use 'servlet/WindchillAuthGW/wt.enterprise.URLProcessor/URLTemplateAction?xsl1=templates/reports/

 

Windchill/servlet/WindchillAuthGW/wt.enterprise.URLProcessor/URLTemplateAction?format=formatCustom&xsl2=&SET_QUERY_LIMIT=20000&xsl1=templates/reports/tsvFormat.xsl&oid=OR%3Awt.query.template.ReportTemplate%3A429999995&MCNumber=009999-02&action=ExecuteReport

In this example the report id is 4299995 and the report is expecting a parameter of 'MCNumber'

SC_9493197
4-Participant
(To:rleir)

Thank you !

 

 

Top Tags