Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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!
Solved! Go to Solution.
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>
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>
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>
<attribute name="epmdoc_docType" value="Part"/>
Correction. "Part" should be "CAD Part"
<attribute name="epmdoc_docType" value="CAD Part"/>
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?
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.
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).
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:
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?
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."
From https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS119374
Title | Creo 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 |
|
Applies To |
|
Cause | |
Resolution |
|
Thank you for your answer.