Skip to main content
1-Visitor
May 11, 2010
Question

Drawings as PDF - Quick way to download them?

  • May 11, 2010
  • 95 replies
  • 33905 views
I have my drawings being published as a PDF by my Pro/e CAD worker. This is fine but in the end my users really need to be able to quickly download or email the PDF. Currently the only way to get the PDF out is to do the following:
1- Go to Drawing Details Page
2- Select "Display Representations List"
3- Click Actions>Save Representation
4- Save Representation out as .zip file to desktop
5- Extract PDF from .zip file and email etc

WAY to much work...does anyone know of a more efficient way to do this?

95 replies

1-Visitor
August 17, 2010
Ed,

At my last employer, we had a custom Windchill app developed by a local PTC
tech and myself, that would create a PDF of the drawing during publishing.
I think the last version I may still have works under Windchill 8.0 m030.

I had the app executed during ECN workflow. First, I would delete all
viewables (because we had Pro/E attributes on the drawing), Secon re-publish
all viewables, Third, publish a PDF from the .dwg's .plt viewable and store
the PDF into a PDF Library with the same version and release # as the .dwg.

We utilized a third party program for the actual .plt to .pdf conversion
that our application called.

The same app can do all three steps, or each one step individually, as
needed.

I might be able to dig some of the info if you would be willing to update it
and share.

1-Visitor
August 17, 2010
The app was developed to handle Pro/E drawings, Unigraphics Drawings, and
Catia v5 drawings. It might have also included AutoCAD, but I do not recall.

1-Visitor
August 18, 2010

Hey ED,

Glad to see you had some success with the tool.

As far as generating PDF's vs PLT's, unless you can't, I would just run your recipe editor & change output to PDF.

To change to PDF output, you go to "Advanced" tab, then "Miscellaneous", then "Drawing Output" to PDF.

That alone wont create great PDF's, but it should generate PDF's, where the saverep will then see PDF's instead of PLT's.

I might be missing a step or 2, because its been a little while since I had to configure for cad worker to generate PDF's.

Now I do recall viewing a Tristar webcast on productview, which helped heavily:

http://www.tristar.com/webcasts/productviewarchives.asp

If you are still bent on converting the PLT's to PDF;s, there is the old route of using ghostscript. Ages ago, I used it & it worked, but since proe & cad worker will create the PDF & associate it to a DRW, I quit using the ghostscript. But if you want to try it, the download on my site is:

http://www.datajett.com/Cadd/ProE/pro2pdf/pro2pdf.zip

The original page is also on my site:

http://www.datajett.com/Cadd/ProE/pro2pdf/pro2pdf.htm

I have no idea whether the links there are any good anymore.

If all else fails, I hear there are a few free plt viewers that yo can point your vendor to. Or whoever you want to send your plt's to.

Hope you get what you need.

L Jett

1-Visitor
August 24, 2010

Summary: Update of finalized procedure, for the folks who have been following this thread, here is the procedure that worked for me. I'm running 9.0 M050. The basic outline is what Lawrence worked out, I've just added some comments etc.

Instructions for download .plt or .pdf

1) Create folder "repsave" in <wt_home>\codebase\wtcore\jsp

copy REPSAVEAS.jsp to that "repsave" folder:

JSP contains 2 strings that are configurable:

dlLoc = "URL" or location, example c:\\temp (must use two \\ characters)

String conType = "pdf";

URL (for dlLoc) can be changed to a server side folder or shared folder,
accessible by user and their client machines.

2) customRB.rbInfo (text file, see below for code) goes here:

<wt_home>\src\com\ptc\windchill\enterprise\repsave

(may need to create repsave directory)

to compile:

<shell> ResourceBuild com.ptc.windchill.enterprise.repsave.customRB

compiled file is customRB.class located at:

<wt_home>\codebase\com\ptc\windchill\enterprise\repsave

--------------------------------------------------------------------------------------
customRB.rbInfo

ResourceInfo.class=wt.tools.resource.StringResourceInfo
ResourceInfo.customizable=true
ResourceInfo.deprecated=false

repsave.REPSAVEAS.title.value=Download DRW PDF or PLT
repsave.REPSAVEAS.icon.value=download.gif
repsave.REPSAVEAS.tooltip.value=Download DRW PDF or PLT
repsave.REPSAVEAS.description.value=Download DRW PDF or PLT
repsave.REPSAVEAS.moreurlinfo.value=height=400,width=700, scrollbars=yes

----------------------------------------------------------------------------------------

3) Backup original custom-actions.xml and custom-actionmodels.xml located at:

<wt_home>\codebase\config\actions

(can rename existing .xml files to .xml.original or copy to backup folder etc)

Copy new custom-actions.xml and custom-actionmodels.xml into specified folder

4) Copy java files, recompile to class etc

(note: supplied class files did not run, therefore

must recompile java files, only need to copy java files)

java files go here:

<wt_home>\codebase\ext


to recompile files:

cd <wt_home>\codebase\ext

javac dlRep.java
javac dlRep_main.java

Command Line from Windchill Shell is:

java ext.dlRep_main <download folder="> <filename> <content type=">

example;

java ext.dlRep_main c:\\temp 12345% plt

1-Visitor
September 9, 2010

I amrunning 9.1 M50, and have the cad worker setup to do pdf's. I followed the instructions. I did not have a C:\PTC\Windchill_9.1\Windchill\codebase\ext folder so I had to create it. I was able to complie no problem.I do not see the new menu item in the actions menu. If I run command line I can see the query in the method server log, but it is not creating the pdf files.

Any advice on where to check what is going wrong?

Thanks

1-Visitor
September 9, 2010


Hi Keith,

I am looking to do the same thing in 9.1. M050. Did you figure out a way to do this?

1-Visitor
September 9, 2010

looks like step 2 customRB.rbInfo did not work for me. I had to do it this way

Add content to

<wt_home>\src\com\ptc\windchill\enterprise\wvs\WVSactionsResource.rbInfo

append with:

repsave.REPSAVEAS.title.value=Download DRW PDF or PLT
repsave.REPSAVEAS.icon.value=download.gif
repsave.REPSAVEAS.tooltip.value=Download DRW PDF or PLT
repsave.REPSAVEAS.description.value=Download DRW PDF or PLT
repsave.REPSAVEAS.moreurlinfo.value=height=400,width=700, scrollbars=yes

Then from windchill shell: <wt_home>

ResourceBuild com.ptc.windchill.enterprise.wvs.WVSactionsResource

1-Visitor
September 10, 2010

This seems to work very well. Thank you all for your work. Is there a way to schedule this to run automaticly? I can do it from WC shell, but cant seem to write a batch file that will run it

Thanks

1-Visitor
September 10, 2010

Has anyone else had a problem with loosing the option "Open in ProductView" from the actions menu ?

After setting up this utility, I lost this option in the actions menu located in a search result and also in the information page.

1-Visitor
September 11, 2010

ED:

We spoke shortly about your "Open in ProductView" option not showing.
But it shows for me. It might be my wc9.1 vs your wc9.0, but I would think
not. I sent you my recipe file, so I don't know if that showed to be different
than yours. But I got my productview to create PDF's after reading / viewing
all of the list below:

PVAdaptersInstallConfigGuide.pdf
RecipeEditorQuickReference.pdf

http://community.tristar.com/

http://www.tristar.com/webcasts/productviewarchives.asp

http://www.tristar.com/software/productview.asp

http://www.tristar.com/webcasts/windchillarchives.asp

=======================================

Keith

when you appended rbInfo content to:

<wt_home>\src\com\ptc\windchill\enterprise\wvs\WVSactionsResource.rbInfo

That was in the readme that way. We adjusted in this forum area for Ed, because
he was on wc9.0 & not on wc9.1. wc9.0 might not have that rbInfo file.

Both have worked.

You had posted that the actions menu did not show "Download DRW PDF or PLT"

Does it show now & work?

As far as a batch/automated route to do multiples, there are maybe several routes.

Play with the <number search=" string="> argument.

java ext.dlRep_main <download folder="> <number search=" string="> <content type=">

Do individual runs or create a batch bat:

java ext.dlRep_main C:\TEMP 19001% pdf
java ext.dlRep_main C:\TEMP 27001% pdf
java ext.dlRep_main C:\TEMP 31001% pdf

If you want to maybe run the program from a text file that includes all
the DRW's you desire to download a pdf of. Here is an idea.

Create a LIST.TXT file & place only DRW numbers on each line like:

1900110.DRW
1900113.DRW
1900119.DRW
2100104.DRW
3900010.DRW

Then create a bat which includes this content:

for /f %%x in (LIST.TXT) do java ext.dlRep_main C:\TEMP %%x pdf
pause

Now I don't know if the straight 1900110.DRW or if 1900110% works better.

I have not checked anything but %, because I don't have that many DRW's in
my wc database to worry about.

Now as far as the bat & LIST.TXT, I have not tested this for dlRep_main,
so step lightly & test with only1-2 at 1st.

Now some one could maybe create a actions bar icon/program in wc that would
allow users to collect many DRWS (from search or ?), but that would be a lot of
work & not likely do be done on free time..ha..ha

=======================================

Shaylyn

Go through all pages of this post & you should be able to get yours to work also.

You might save time going right to the readme.txt & zip on my site:

http://www.datajett.com/windchill/wc_dev/saverep/saverep_readme.txt

http://www.datajett.com/windchill/wc_dev/saverep/dlRep_REPSAVEAS.zip

L Jett
cadjett@aol.com;datajett@aol.com