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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Publishing CAD files to different files types in Windchill 10.1

AndrewDrenner
7-Bedrock

Publishing CAD files to different files types in Windchill 10.1

I'm looking to publish Creo drawings to PDF and DXF and publish parts/assemblies to CreoView and STEP... The documentation goes over how to sort by epm-type in the publishing rules but all the "CAD Documents" are of a single epm type. They are further sorted by document category (i.e. "CAD Part" or "Drawing") within the epm type of "CAD Document" but I can figure out if it's possible or not to sort by document category. Anyone been able to do this?

Thanks!

ACCEPTED SOLUTION

Accepted Solutions

After a lot of trial and error I figured out the solution to my problem. My publisher rules file looks like the following now:

<?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="PROE">

<additional-files name="drawing_files">

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

<file display-label="PDF" type="pdf" default="true" output-prefix="pdf" />

<file display-label="DXF" type="dxf" default="false" output-prefix="dxf" />

</additional-files>

<additional-files name="part_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="IGES" type="iges" default="false" output-prefix="iges" />

</additional-files>

<additional-files name="asm_files">

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

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

<file display-label="IGES" type="iges" default="false" output-prefix="iges" />

</additional-files>

<condition name="is_drawing">

<attribute name="epmdoc_name" regex=".*\.drw" />

</condition>

<condition name="is_part">

<attribute name="epmdoc_name" regex=".*\.prt" />

</condition>

<condition name="is_asm">

<attribute name="epmdoc_name" regex=".*\.asm" />

</condition>

<!-- Following conditions are evaluated based on the order they appear in this file -->

<if condition="is_drawing">

<publish on="checkin" display-label="Publish drawing - checkin" additional-files="drawing_files" />

<publish on="create-representation" display-label="Publish drawing" additional-files="drawing_files" />

</if>

<if condition="is_part">

<publish on="checkin" display-label="Publish part - checkin" additional-files="part_files" />

<publish on="create-representation" display-label="Publish part" additional-files="part_files" />

</if>

<if condition="is_asm">

<publish on="checkin" display-label="Publish assembly - checkin" additional-files="asm_files" />

<publish on="create-representation" display-label="Publish assembly" additional-files="asm_files" />

</if>

</authoring-application>

</rules>

View solution in original post

11 REPLIES 11

After a lot of trial and error I figured out the solution to my problem. My publisher rules file looks like the following now:

<?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="PROE">

<additional-files name="drawing_files">

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

<file display-label="PDF" type="pdf" default="true" output-prefix="pdf" />

<file display-label="DXF" type="dxf" default="false" output-prefix="dxf" />

</additional-files>

<additional-files name="part_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="IGES" type="iges" default="false" output-prefix="iges" />

</additional-files>

<additional-files name="asm_files">

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

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

<file display-label="IGES" type="iges" default="false" output-prefix="iges" />

</additional-files>

<condition name="is_drawing">

<attribute name="epmdoc_name" regex=".*\.drw" />

</condition>

<condition name="is_part">

<attribute name="epmdoc_name" regex=".*\.prt" />

</condition>

<condition name="is_asm">

<attribute name="epmdoc_name" regex=".*\.asm" />

</condition>

<!-- Following conditions are evaluated based on the order they appear in this file -->

<if condition="is_drawing">

<publish on="checkin" display-label="Publish drawing - checkin" additional-files="drawing_files" />

<publish on="create-representation" display-label="Publish drawing" additional-files="drawing_files" />

</if>

<if condition="is_part">

<publish on="checkin" display-label="Publish part - checkin" additional-files="part_files" />

<publish on="create-representation" display-label="Publish part" additional-files="part_files" />

</if>

<if condition="is_asm">

<publish on="checkin" display-label="Publish assembly - checkin" additional-files="asm_files" />

<publish on="create-representation" display-label="Publish assembly" additional-files="asm_files" />

</if>

</authoring-application>

</rules>

For my opinion better condition is:

<condition name="is_drawing">

<attribute name="epmdoc_CADName" regex=".*\.drw" />

</condition>

<condition name="is_part">

<attribute name="epmdoc_CADName" regex=".*\.prt" />

</condition>

<condition name="is_asm">

<attribute name="epmdoc_CADName" regex=".*\.asm" />

</condition>

TomU
23-Emerald IV
(To:pburtsev)

Instead of using "epmdoc_name" or "epmdoc_CADName", why not use "epmdoc_docType"?

For example:

<condition name="Valid_Creo_Type">

<or>

<attribute name="epmdoc_docType" value="Assembly"/>

<attribute name="epmdoc_docType" value="Drawing"/>

<attribute name="epmdoc_docType" value="Drawing format"/>

<attribute name="epmdoc_docType" value="Layout"/>

<attribute name="epmdoc_docType" value="Part"/>

</or>

</condition>

TomU
23-Emerald IV
(To:TomU)

<attribute name="epmdoc_docType" value="Part"/>

Correction. "Part" should be "CAD Part"

<attribute name="epmdoc_docType" value="CAD Part"/>

HJ1
15-Moonstone
15-Moonstone
(To:TomU)

@TomU,

 

Hi, an old thread, but something I'm struggling with in 11.1 M020,

that "epmdoc_name" is something I'd need to use in the rule to have different set of additional files for certain drawings based on their name, say everything else could have pdf and dxf while a big assembly such as "Machine" should have only pdf.

 

However, this does not seem to work:

 

<condition name="is_part">
<attribute name="epmdoc_CADName" regex=".*\.SLDDRW$"/>
</condition>

<condition name="is_assembly">
<and>
<attribute name="epmdoc_CADName" regex=".*\.SLDDRW$"/>
<attribute name="epmdoc_name" value="Machine"/>
</and>
</condition> 

 

It looks like the latter condition section with 'and' is always ignored and the additional files are published according to the rule section referring to the first condition, so how should the syntax be?

 

TomU
23-Emerald IV
(To:HJ1)

Open the representation in Creo View and look at the 'Name' attribute.  Does the value shown in Creo View exactly match what you have here?

<attribute name="epmdoc_name" value="Machine"/>

 

I can't remember at the moment if wildcards are allowed for the 'Name' attribute.  If not, you might need to pass a regex value in for this as well.

HJ1
15-Moonstone
15-Moonstone
(To:TomU)

@TomU 

Hi, thanks,

epmdoc_name does have the exact same content in Creo View attributes, but the condition is still ignored. I tried entering it as regex, hopefully with correct syntax, but no change.

 

We have AfterEDRLoader to publish additional files as Attachments, but I came to conclusion that it should not be of relevance here... 

After i create publish rules windchill generate dxf for drawing files. But i have a problem for 2 or more sheet drawings. Cad worker create a zip file with 2 ore more dxf files that are identical (i think cad worker create one dxf file for sheet).dxf_zip.png

I want to create single dxf file for multiple sheet drawing or zip archive that contained only 1 sheet per dxf.

In creo i have this option:

dxf_sheet.png

But i can't find this option in any Config.pro option list document (this option create dxf with active sheet only).

Or may be i can check "All sheet as paper scale" to create one dxf with all sheets in drawing.

How to configure proe2pv adapter create such type dxf files?

TomU
23-Emerald IV
(To:pburtsev)

From the "CreoView3_m010_MCADAdaptersInstallConfigGuide",

"You can further configure the output in the Publish Rules by defining the <additional-files> elements. For 3D files, you can specify the geometry information to include, configure the output as a single file or multiple files, and for JT, convert annotations. For 2D files, with the exception of PDF, the output format for multisheet drawings is multiple files, one for each sheet. For PDF files the output is one file with a page for each sheet. The PDF output is based on the Recipe Options. If a single <file> element produces a multifile output, the output files are placed in a single ZIP archive."

TomU
23-Emerald IV
(To:pburtsev)

From https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS119374

TitleCreo View Adapters 2.0: Using WVS Publish Rules Additional File Type configuration to output DXF for a multi-sheet drawing generates an identical output DXF file for each sheet, each containing all sheets
Description
  • The Adapter for Creo Parametric generates an alternate format DXF file for each sheet in the Creo Parametric Drawing but each DXF contains all drawing sheets
  • Using additional-files elements in WVS Publish Rules to export 2D DXF for a two sheet drawing generates two identical DXF files
Applies To
  • Creo View Adapters 2.0 M020
  • Adapter for Creo (Parametric & Direct)
  • Creo Parametric 2.0 M040
  • Windchill PDMLink 10.1 M020-M040
  • Visualization Services (WVS)
Cause
Resolution
  • Reported to R&D as SPR 2171401
  • Corrected at Creo View Adapters 3.0 F000
    • The adapter now generates a single DXF, containing a single drawing sheet, for each sheet in the source Creo Parametric drawing
pburtsev
7-Bedrock
(To:TomU)

Thank you for your answer.

Announcements


Top Tags