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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

generate PDF from drawings and store in Windchill

ptc-4281857
1-Visitor

generate PDF from drawings and store in Windchill

Hi,

I have a range of drawings that I have stored on Windchill. How do I genereate PDF files of these drawings? And is there a way of storing them/ exporting them to an external location outside of Windchill?

Is this something that is done within Creo or Windchill?

Thnaks.

ACCEPTED SOLUTION

Accepted Solutions
vmhala
10-Marble
(To:BryanK)

William,

A CAD Worker can be configured which can convert your drawings in PDF format. Later a Post Publish deligate can be written to make a wt.document of this PDF file. This makes PDF management most efficient in Windchill.

Apart from Creo and Windchill you will need a ProductView (CreoView) Adaptor - which talks with creo on one end and with Windchill on the other. Check ProductView adaptor installation and configuration guide for more deatils on installing the CAD Worker.

Cheers,

Vaibhav

View solution in original post

25 REPLIES 25

Hi,

We have a customization that does what you want it to do.

Contat me if you are interested.

Regards

Bryan

BryanK
16-Pearl
(To:BryanK)

Hi,

you can use the publisher to create pdf's of your drawings by selecting the pdf option in the visualtion area.

to export them to a drive you will need a customization.

vmhala
10-Marble
(To:BryanK)

William,

A CAD Worker can be configured which can convert your drawings in PDF format. Later a Post Publish deligate can be written to make a wt.document of this PDF file. This makes PDF management most efficient in Windchill.

Apart from Creo and Windchill you will need a ProductView (CreoView) Adaptor - which talks with creo on one end and with Windchill on the other. Check ProductView adaptor installation and configuration guide for more deatils on installing the CAD Worker.

Cheers,

Vaibhav

Hi Vaibhav,

Can you please help me with the step-by-step procedure for the automatic generation of pdf files in windchill.

Sure I can... Do you need the details on CAD Worker configuration ?

Yes please.. Explaining about configuring pdf CAD Worker configuration with auto publish option.

I would also like to understand this.

Thanks,

Derek

Ketan
1-Visitor
(To:vmhala)

Hello Vaibhav,

In my case proeworker is configured for PLT output. But I want to generate PDF file of drawings and attach it to Drawing (EPM Document) as WTDocument through expression robo. Is it possible confguring publishing rule and calling it through exression robo? We are using PDMLink 10.1 M040.

If expression robo is not possible, I would like to have WTDocument with PDF on every checink. Is it possible wit simple configuration?

Hi Ketan,

You can actually use some APIs to create a new representation.

Also, in your CAD Worker, you can configure the representation type as PDF.

Once the representation is generated, you can use the APIs to then download the representation, create a new WTDoc and attach the representation (.zip) or the PDF to it.

You need to set the Drawing Output to PDF in the recipe editor file (proe2pv.rcp) in your configured CAD worker location:

Proe2PV.JPG

Let me know if you need more help on the APIs to create a new representation.

I dont want to change in Recipe editor. Typically we want PLT output so I have set it to HPGL. But as part of approval process, we need PDF output to share with external users. The PDF is required only when Drawing is released through approval process. Also we want to track what was PDF version when it was released.

Another question. How the "Drawing Output" in Recipe is linked to "output" attribute of "publish" in publishing rule.? Can i have HPGL in recipe and PDF in rule?

To generate a viewable, whether in PLT or PDF format, the Creo View Adapter would need to be configured. There is a way to generate representation in more than one formats for CAD Objects. You can check the Windchill Visualization Services Guide for 10.1, under pg no 56 onwards under "About Publish Rules" <pg no 56>.

You could configure the publish rules to product PLT as well as PDF formats. This can be done by adding the multiple outputs under PublishRules-AdditionalFiles.xml file.

The other option in my opinio, would be to have some customization to convert the native CAD drawing or PLT format into PDF thru Java apis.

Below is an example of the publishRule-AdditionalFiles.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<rules xmlns="http://www.ptc.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd"
evaluate-rules-on-republish="true">
<!-- The 'evaluate-rules-on-republish' attribute above provides a default value for
all the <publish> elements in this file. If this attribute is absent here, the
default is 'false'.
-->

<!-- Conditions, additional files, and parameter sets declared here may be referenced
by all authoring applications
-->

<!-- Any part that is not in the Released state -->
<condition name="is_unreleased_part">
<and>
<attribute name="epmdoc_lifeCycleName" value="Basic"/>
<not>
<attribute name="epmdoc_lifeCycleState" value="Released"/>
</not>
</and>
</condition>

<!-- Additional files declared here may be referenced by all authoring applications -->
<additional-files name="proe2igesSOLIDS_stepSURFACES">
<file display-label="To IGES Solids" type="iges" default="true" output-prefix="igesSolids" output-suffix="SSS" >
<option name="ConvertGeometry" value="Solids" />
</file>
<file display-label="To STEP Surfaces" type="step" default="true" output-prefix="stepSurfaces" >
<option name="ConvertGeometry" value="Surfaces" />
</file>
</additional-files>

<authoring-application name="PROE">

<!-- Additional files declared inside an authoring application can only be referenced
by the authoring application itself.
-->
<additional-files name="proe2step_Release_to_Suppliers">
<file display-label="STEP files for Supplier A" type="step" default="true" output-prefix="stepA" />
<file display-label="STEP files for Supplier B" type="step" default="true" output-prefix="stepB">
<option name="ConvertGeometry" value="Solids|Surfaces" />
</file>
</additional-files>

<additional-files name="proe2dxf_iges_step_ALL">
<!-- only default='true' files will be generated at this time -->
<file display-label="STEP" type="step" default="true" output-prefix="step" />
<file display-label="IGES" type="iges" default="true" output-prefix="iges" />
<file display-label="DXF" type="dxf" default="false" output-prefix="dxf" />
</additional-files>

<!-- All parts named 01-52*.prt or 01-52*.asm that are in the Released state -->
<condition name="is_released_52000_part">
<and>
<attribute name="epmdoc_lifeCycleName" value="Basic"/>
<attribute name="epmdoc_lifeCycleState" value="Released"/>
<or>
<attribute name="part_name" regex="01-52.*\.prt"/>
<attribute name="part_name" regex="01-52.*\.asm"/>
</or>
</and>
</condition>

<!-- Following conditions are evaluated based on the order they appear in this file -->
<if condition="is_unreleased_part">
<publish on="checkin" additional-files="proe2dxf_iges_step_ALL" />
<publish on="create-representation" display-label="Publish + IGES Solids + STEP Surfaces" additional-files="proe2igesSOLIDS_stepSURFACES" />
<publish on="create-representation" display-label="Publish + STEP/IGES/DXF" additional-files="proe2dxf_iges_step_ALL" />
<publish on="create-representation" display-label="Publish w/o any additional file" />
<publish on="schedule" additional-files="proe2step_Release_to_Suppliers" />
</if>
<if condition="is_released_52000_part">
<!-- No <publish on="check-in"> here because most often check-in isn't allowed for released parts. -->
<!-- The 'evaluate-rules-on-republish' attribute of the <publish> element overwrites
the default value defined at the beginning of the file.
-->
<publish on="create-representation" display-label="Publish + STEP files to suppliers" additional-files="proe2step_Release_to_Suppliers" evaluate-rules-on-republish="false" />
<publish on="schedule" additional-files="proe2step_Release_to_Suppliers" evaluate-rules-on-republish="false" />
</if>

</authoring-application>

</rules>

/// <summary>

/// create an empty PDFDocument

/// </summary>

/// <param name="pageCount"></param>

/// <returns></returns>

public PDFDocument CreatePDFDocument(int pageCount)

{

return new PDFDocument(pageCount);

}

these are some codes i am using to generate pdf format with a .net pdf project.

and the following APIs are helpful as well.

PDFDocument(List<REImage> imageSource);

PDFDocument(List<REImage> imageSource, List<PDFCompression> compressions);

How to call publishing rule defined using XML through workflow task? Also I would like to know the API to get additional files from presentation.

ss3
10-Marble
10-Marble
(To:ptc-5197553)

Hi @ptc-5197553

If i double click on "rcpedit" , window is getting popup and within a fraction of second it auto closes.

Any other ways to edit "rcpedit"

 

I am using creo3.0 M080

below is the hard drive link where "rcpedit" is located.

C:\Program Files\PTC\Creo 3.0\M080\Common Files\apps\prodview\i486_nt\obj

 

attached image of it.

Thanks, Sateesh

RandyJones
20-Turquoise
(To:ss3)


@ss3 wrote:

Hi @ptc-5197553

If i double click on "rcpedit" , window is getting popup and within a fraction of second it auto closes.

Any other ways to edit "rcpedit"

 


You can simply edit the proe2pv.rcp file with your favorite text editor.

dnordin
16-Pearl
(To:ss3)

I believe you need to set $PVIEW_HOME and have an exisitng recipe file in that folder for rcpedit.exe to startup.

 

Regards,

 

Dan N.

SV_9649587
5-Regular Member
(To:vmhala)

Hello Vaibhav,

 

I know this post is very old. Just trying my luck as I am new to windchill customization. 

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.

 

Regards,

Siju

 

 

 

adutta
1-Visitor
(To:BryanK)

Hi Bryan,

Can you share ur customization code to copy the published pdfs to a different location?

Thanks,

Animesh

dtran-4
6-Contributor
(To:BryanK)

Hi,

 

Can you share this with me? I have a requirement to the same thing

I have been trying to do something similar to this.  Our business process depends on the output of STEP and parasolid files from our model files.  I am trying to make them more accessible by putting them into their own WTDocument during the publish phase.  I have written the following publishing rule xml.  The file passes validation and loads into the WC system.  On publish it is creating the Step and Parasolid and attaching them as representations.  Id does not seem to be performing the post-publishing operations and creating the WTDocument.  I am not seeing any error/log information of failure.  Could someone please look at the XML and see if I am missing a trigger statement somewhere?  Thank you.

<?xml version="1.0" encoding="UTF-8"?>

<rules xmlns="http://www.ptc.com"

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd"

  evaluate-rules-on-republish="true">

  <authoring-application name="SOLIDWORKS">

   <additional-files name="standard_files">

          <!-- only default='true' files will be generated at this time -->

          <file display-label="STEP" type="step" default="true" output-prefix="step" />

          <file display-label="PARASOLID" type="Parasolid" default="true" output-prefix="Parasolid" />

     </additional-files>

      <param-set name="Share with WTDocument">

        <post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish>

        <post-publish name="name">{ADDITIONAL_FILE_PRIMARY_EXTENSION}_FOR_{EPM_NAME}</post-publish>

        <post-publish name="folder">/Design</post-publish>

        <post-publish name="type">com.mtc.MCADAdditionalFiles</post-publish>

        <post-publish name="number">{EPM_NUMBER}-{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish>

      </param-set>

      <publish on="checkin" display-label="Additional Files" additional-files="standard_files" param-set="Share with WTDocument"/>

      <publish on="create-representation" display-label="Additional Files" additional-files="standard_files" param-set="Share with WTDocument"/>

   <publish on="schedule" display-label="Additional Files" additional-files="standard_files" param-set="Share with WTDocument"/>

  </authoring-application>

</rules>

UPDATE:

     I added a manual option to run the post publish and I am seeing an error that says

Post Publishing Succeeded with Warnings
Warning: No additional files match the regular expression in the post publish parameter set
TomU
23-Emerald IV
(To:sarcher)

You might try removing the "param-set" piece and just verify that the additional files are generated correctly (and attached to the primary representation.)  Once you're sure that's working you can fix the post-publish delegate.

sarcher
10-Marble
(To:TomU)

sorry should have been more clear.  I started from that direction and the files are being created.  Even with the above code I can go to the view you depict in your image and I see the relevant files.  Then I click Post Publish and get the error.

TomU
23-Emerald IV
(To:sarcher)

Only two of the param-set values are required, "delegate" and "name".  Maybe try removing the others just for testing purposes.

sarcher
10-Marble
(To:TomU)

Still the same result.  I think I might need to open a case with PTC and see if this is a bug. FYI I am working on 11.0 M010

Hi,

Try specifying file extension in the param-set. You want to share with the WTDocument but you should specify which type of files should be shared. somthing like below

<post-publish name="additional-file-primary" delete-original="true">.*\.pdf</post-publish>

Sharing with WTDocument creates duplicated PDF files. One in representation and another in WTDocument. You can choose to keep it or delete it. Use delete-original to true as in above configuration to delete it if you need...

Hope this helps.

Announcements


Top Tags