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

We are happy to announce the new Windchill Customization board! Learn more.

Custom Windchill worker for AutoCAD

VladiSlav
17-Peridot

Custom Windchill worker for AutoCAD

We are trying to configure a custom Windchill worker to generate Creo View Representations in PDF format
of AutoCAD dwg, dxf files referring to this article: https://www.ptc.com/en/support/article/CS40919

We are currently experiencing an error: "..cannot produce output file xxx.out ".

How to solve this problem?

18 REPLIES 18

 
DKWc
13-Aquamarine
(To:VladiSlav)

Hi Valdi,

Were you able to configure the AutoCAD worker

 

VladiSlav
17-Peridot
(To:DKWc)

Hello,  DurgaK, I could not solve the problem

@VladiSlav 

Have you tried this article?

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

PetrH

DKWc
13-Aquamarine
(To:HelesicPetr)

Hi Validi,

Followed the article https://www.ptc.com/en/support/article/CS40919. Able to configure worker and turn on.

The good part is it's trying to publish as well, however, the hurdle is accorconsole.exe is not creating any pdf.

If I place a dummy .pdf file in ftp folder created the representation is getting generated.

Tried to have a deep dive and found some bottleneck.

AutoCADWorker.bat triggers -> workerjava.bat which triggers -> customgenericeworker.java which triggers -> pdfconvertor.bat  which actually picks up the .dwg from FTP folder and creates .pdf in the same folder. Then windchill worker picks up the pdf to create representation. ( The said files are provided in CS40919.)

Tried manually publishing pdf using accorconsole, creating bat script it's working fine.

The script from pdfconvertor.bat file

%CONVERTER% /i %1 /s %2 /l > AcCoreConsole.log 2>&1.

In this script where do we find %1 and %2 value defined? Any idea.

 

 

HelesicPetr
21-Topaz II
(To:DKWc)

Hi @DKWc 

Edit the bat file and add a line 

echo /i %1 /s %2 > c:\logpdfconvertor.log

 

this will show you the values if the script is run.

you will find it in c:\logpdfconvertor.log file. Sure you can point to an another location.

 

PetrH

DKWc
13-Aquamarine
(To:HelesicPetr)

Hi @HelesicPetr ,

Thanks for the reply.
From where and we can reset/change the values?

HelesicPetr
21-Topaz II
(To:DKWc)

Hi @DKWc 

 

Who knows. You need to find it. 

If you know values, you can search for it.

For example try to search a string values in all files and so on. If you are lucky you will find them.

I advice you how to get the value, now it is up to you to find the location where are defined. 

 

PS: you find that the bat file is run from customgenericeworker.java so in this class there are the variables I guess. 

 

PetrH 

DKWc
13-Aquamarine
(To:HelesicPetr)

Hi All,

Seems the efforts finally paying off. The pdf is getting generated in the tmp folder however it comes with the suffix "-model".

Eg 56GF-Model.pdf , due to this the server is not able to pick the pdf file and generate representation.

If manually delete the suffix from pdf generated representation is getting generated.

The scr been used is attached.

Tried multiple ways still, suffix is getting generated.

Any suggestions on how to get rid of the suffix?

thanks in advance.

 

Regards,

Durga

HelesicPetr
21-Topaz II
(To:DKWc)

Hi @DKWc 

Because I don't know how a configuration is set in the system and I guess you can not change the behavior I would use a WVS Afterloader action where you can change the name of the PDF document. 

 

here is example how the WVS Afterloader works. CS349681

 

Hope the idea can help

 

PetrH

DKWc
13-Aquamarine
(To:HelesicPetr)

Hi,

Thanks for the reply.

The proposed case is to rename the representations which are generated.

The actual scenario is the representation is not getting generated because the published pdf with the use of accoreconsole has a suffix that stops Windchill to pick up the published pdf from the temp folder. (EPM doc name and published pdf name differs due to suffix, which doesn't generate representation.)

If the suffix gets eliminated representation is generated.

 

Regards,

Durga

HelesicPetr
21-Topaz II
(To:DKWc)

Hi @DKWc 

My bad, I thought that the representation is created without pdf so my idea with WVS Afterloader can not work.

 

There has to be some configuration where the suffix is defined... for example publish rules CS111916 where suffix or prefix is set for additional files.

 

what PTC support tells you? 

 

PetrH

HelesicPetr
21-Topaz II
(To:DKWc)

Hi @DKWc 

the case describes a script to add 

HelesicPetr_0-1686727232430.png

 

Can you use this place for renaming the generated PDF? Or somewhere else?

 

PetrH

rhart
14-Alexandrite
(To:DKWc)

You could try using ‘EXPORT’ in the scr instead of PLOT, export is like save as pdf rather than print a pdf, I used export for custom autocad workers and the pdf file name is the same as the drawing number + .pdf

DKWc
13-Aquamarine
(To:rhart)

Hi,

Thanks for your reply.

If manually use export in AutoCAD UI it doesn't generate any prefixes or suffixes.

Any sample file scr you have for export.

 

Regards,

Durga

 

HelesicPetr
21-Topaz II
(To:DKWc)

Hi @DKWc 

Use EXPORT instead of PLOT in your configuration 

 

HelesicPetr_0-1686807548325.png

 

Also I would play with the script that cares about pdf name

HelesicPetr_0-1686808039139.png

 

PetrH

rhart
14-Alexandrite
(To:DKWc)

 Sure, see attached.

In our case, we export only the paperspace views to PDF,

 

DKWc
13-Aquamarine
(To:rhart)

This script exactly worked for me.

Thanks HART you were popped in at exact right time.

This is working exactly as expected.

The publication is working fine.

Top Tags