Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello,
We are using the following publis rules, they are triggered within a workflow:
<?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'. --> <!-- CREO FILES Handling (PROE) --> <authoring-application name="PROE"> <additional-files name="stl"> <file display-label="STL" type="stl" default="true" output-prefix="stl"/> </additional-files> <additional-files name="step"> <file display-label="STEP AP214" type="step" default="true" output-prefix="stp"/> </additional-files> <additional-files name="x_t"> <file display-label="Parasolid x_t" type="PARASOLID" default="true" output-prefix="x_t" /> </additional-files> <condition name="makeSTEP"> <and> <or> <attribute name="epmdoc_CADName" regex=".*\.prt" /> <attribute name="epmdoc_CADName" regex=".*\.asm" /> </or> <or> <attribute name="epmdoc_TEILEART" value="ABC" /> <attribute name="epmdoc_TEILEART" value="XYZ" /> </or> </and> </condition> <condition name="makeSTL"> <and> <or> <attribute name="epmdoc_CADName" regex=".*\.prt" /> <attribute name="epmdoc_CADName" regex=".*\.asm" /> </or> <attribute name="epmdoc_TEILEART" value="STLON" /> </and> </condition> <condition name="makeXT"> <and> <or> <attribute name="epmdoc_CADName" regex=".*\.prt" /> <attribute name="epmdoc_CADName" regex=".*\.asm" /> </or> <or> <attribute name="epmdoc_TEILEART" value="ABC" /> <attribute name="epmdoc_TEILEART" value="XZY" /> <attribute name="epmdoc_TEILEART" value="OPQ" /> </or> </and> </condition> <if condition="makeSTL"> <publish on="unknown-source" additional-files="stl" param-set="post-stl" /> </if> <if condition="makeSTEP"> <publish on="unknown-source" additional-files="step" param-set="post-step" /> </if> <if condition="makeXT"> <publish on="unknown-source" additional-files="x_t" param-set="post-x_t" /> </if> <param-set name="post-stl"> <post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish> <post-publish name="name">Stl_File_For_{AUTHORING_APP}_{EPM_NUMBER}_{ADDITIONAL_FILE_PRIMARY_BASENAME}_{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish> <post-publish name="published-content-link">stl</post-publish> <!--post-publish name="additional-file-primary" delete-original="true">.*\.stl</post-publish--> </param-set> <param-set name="post-step"> <post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish> <post-publish name="name">Step_File_For_{AUTHORING_APP}_{EPM_NUMBER}_{ADDITIONAL_FILE_PRIMARY_BASENAME}_{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish> <post-publish name="published-content-link">stp</post-publish> <!--post-publish name="additional-file-primary" delete-original="true">.*\.stp</post-publish--> </param-set> <param-set name="post-x_t"> <post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish> <post-publish name="name">XT_File_For_{AUTHORING_APP}_{EPM_NUMBER}_{ADDITIONAL_FILE_PRIMARY_BASENAME}_{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish> <post-publish name="published-content-link">x_t</post-publish> <!--post-publish name="additional-file-primary" delete-original="true">.*\.x_t</post-publish--> </param-set> </authoring-application> </rules>
The publishing basically works, but for documents that match multiple criteria (for example makeXT and makeSTEP, only STEP files are generated. Is windchill only evaluating one if statement?
Thanks for your help 🙂
Solved! Go to Solution.
Yes, only the first match is executed. You need to create conditional statements that capture all possible variants. Here is a small chunk of my current rules. Notice how there are multiple additional files sections with different combinations.
<?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'. --> <authoring-application name="PROE"> <!-- Additional files definitions --> <additional-files name="2D_IGES_DXF_PDF"> <file display-label="IGES" type="iges" default="true" output-prefix="IGES" /> <file display-label="DXF" type="dxf" default="true" output-prefix="DXF" /> <file display-label="PDF" type="pdf" default="true" output-prefix="PDF" /> </additional-files> <additional-files name="2D_PDF"> <file display-label="PDF" type="pdf" default="true" output-prefix="PDF" /> </additional-files> <additional-files name="3D_ASM_STEP"> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="AssemblyConfiguration" value="SingleFile" /> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> </additional-files> <additional-files name="3D_PRT_STEP"> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> </additional-files> <additional-files name="TM_ASSEMBLY_IGES_STEP_STL"> <file display-label="IGES" type="iges" default="true" output-prefix="IGES"> <option name="AssemblyConfiguration" value="SingleFile" /> <option name="ConvertGeometry" value="Solids|Quilts" /> </file> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="AssemblyConfiguration" value="SingleFile" /> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> <file display-label="STL" type="stl" default="true" output-prefix="STL"> <option name="ChordHeight" value="0.01" /> </file> </additional-files> <additional-files name="TM_PART_IGES_STEP_STL"> <file display-label="IGES" type="iges" default="true" output-prefix="IGES"> <option name="ConvertGeometry" value="Solids|Quilts" /> </file> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> <file display-label="STL" type="stl" default="true" output-prefix="STL"> <option name="ChordHeight" value="0.01" /> </file> </additional-files> <!-- ================================================================== --> <!-- ======================= In Work ================================== --> <!-- ================================================================== --> <!-- 2D Creo objects that are allowed to be published at 'In Work' state --> <condition name="2D_Creo_Type_In_Work"> <and> <or> <attribute name="epmdoc_docType" value="Drawing"/> <attribute name="epmdoc_docType" value="Format"/> <attribute name="epmdoc_docType" value="Layout"/> </or> <attribute name="epmdoc_lifeCycleState" value="In Work"/> </and> </condition> <if condition="2D_Creo_Type_In_Work"> <publish on="create-representation" display-label="2D Manual Publish (CI01)" /> <publish on="create-representation" display-label="2D Manual Publish + PDF (CI01a)" additional-files="2D_PDF" /> <publish on="checkin" display-label="Check-in Publish (CI02)" /> <publish on="schedule" display-label="Scheduled Publish (CI03)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish (CI04)" /> </if> <!-- Creo parts that are allowed to be published at 'In Work' state --> <condition name="Creo_Parts_In_Work"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="In Work"/> </and> </condition> <if condition="Creo_Parts_In_Work"> <publish on="create-representation" display-label="3D Manual Publish (CI05)" /> <publish on="checkin" display-label="Check-in Publish (CI06)" /> <publish on="schedule" display-label="Scheduled Publish (CI07)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish (CI08)" /> </if> <!-- Creo assemblies that are allowed to be published at 'In Work' state --> <condition name="Creo_Assemblies_In_Work"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="In Work"/> </and> </condition> <if condition="Creo_Assemblies_In_Work"> <publish on="create-representation" display-label="3D Manual Publish (CI09)" /> <publish on="checkin" display-label="Check-in Publish (CI10)" /> <publish on="schedule" display-label="Scheduled Publish (CI11)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish (CI12)" /> </if> <!-- ================================================================== --> <!-- ======================= Released ================================= --> <!-- ================================================================== --> <!-- 2D Creo objects that are allowed to be published at 'Released' state, but without export data --> <condition name="2D_Creo_Type_Released_No_Export"> <and> <or> <attribute name="epmdoc_docType" value="Drawing"/> <attribute name="epmdoc_docType" value="Format"/> <attribute name="epmdoc_docType" value="Layout"/> </or> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_EXPORT_DATA" value="False"/> </and> </condition> <if condition="2D_Creo_Type_Released_No_Export"> <publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR01)" additional-files="2D_IGES_DXF_PDF" /> <publish on="create-representation" display-label="2D Manual Publish + PDF (CR02)" additional-files="2D_PDF" /> <publish on="schedule" display-label="Scheduled Publish + PDF (CR03)" additional-files="2D_PDF" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + PDF (CR04)" additional-files="2D_PDF" /> </if> <!-- 2D Creo objects that are allowed to be published at 'Released' state with export data --> <condition name="2D_Creo_Type_Released_With_Export"> <and> <or> <attribute name="epmdoc_docType" value="Drawing"/> <attribute name="epmdoc_docType" value="Format"/> <attribute name="epmdoc_docType" value="Layout"/> </or> <attribute name="epmdoc_lifeCycleState" value="Released"/> <!-- No EXPORT_DATA check required. Export unless explicitly set to "No". --> </and> </condition> <if condition="2D_Creo_Type_Released_With_Export"> <publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR05)" additional-files="2D_IGES_DXF_PDF" /> <publish on="schedule" display-label="Scheduled Publish + IGES/DXF/PDF (CR06)" additional-files="2D_IGES_DXF_PDF" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + IGES/DXF/PDF (CR07)" additional-files="2D_IGES_DXF_PDF" /> </if> <!-- Creo 'TM Parts' at 'Released' state in the Pre-Production context --> <condition name="Creo_TM_Parts_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_containerName" value="Pre-Production"/> <!-- No EXPORT_DATA check required. Export regardless of the value. --> </and> </condition> <if condition="Creo_TM_Parts_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR08)" additional-files="TM_PART_IGES_STEP_STL" /> <publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR09)" additional-files="TM_PART_IGES_STEP_STL" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR10)" additional-files="TM_PART_IGES_STEP_STL" /> </if> <!-- Creo parts that are allowed to be published at 'Released' state, but without export data --> <condition name="Creo_Parts_Released_No_Export"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_EXPORT_DATA" value="False"/> </and> </condition> <if condition="Creo_Parts_Released_No_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR11)" additional-files="3D_PRT_STEP" /> <publish on="create-representation" display-label="3D Manual Publish - No Export (CR12)" /> <publish on="schedule" display-label="Scheduled Publish - No Export (CR13)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish - No Export (CR14)" /> </if> <!-- Creo parts that are allowed to be published at 'Released' state with export data --> <condition name="Creo_Parts_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <!-- No EXPORT_DATA check required. Export unless explicitly set to "No". --> </and> </condition> <if condition="Creo_Parts_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR15)" additional-files="3D_PRT_STEP" /> <publish on="schedule" display-label="Scheduled Publish + STEP (CR16)" additional-files="3D_PRT_STEP" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + STEP (CR17)" additional-files="3D_PRT_STEP" /> </if> <!-- Creo 'TM Assemblies' at 'Released' state in the Pre-Production context --> <condition name="Creo_TM_Assemblies_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_containerName" value="Pre-Production"/> <!-- No EXPORT_DATA check required. Export regardless of the value. --> </and> </condition> <if condition="Creo_TM_Assemblies_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR18)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" /> <publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR19)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR20)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" /> </if> <!-- Creo assemblies that are allowed to be published at 'Released' state with export data --> <condition name="Creo_Assemblies_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_EXPORT_DATA" value="True"/> </and> </condition> <if condition="Creo_Assemblies_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR21)" additional-files="3D_ASM_STEP" /> <publish on="schedule" display-label="Scheduled Publish + STEP (CR22)" additional-files="3D_ASM_STEP" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + STEP (CR23)" additional-files="3D_ASM_STEP" /> </if> <!-- Creo assemblies that are allowed to be published at 'Released' state, but without export data --> <condition name="Creo_Assemblies_Released_No_Export"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <!-- No EXPORT_DATA check required. Do NOT export unless explicitly set to "Yes". --> </and> </condition> <if condition="Creo_Assemblies_Released_No_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR24)" additional-files="3D_ASM_STEP" /> <publish on="create-representation" display-label="3D Manual Publish - No Export (CR25)" /> <publish on="schedule" display-label="Scheduled Publish - No Export (CR26)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish - No Export (CR27)" /> </if>
Yes, only the first match is executed. You need to create conditional statements that capture all possible variants. Here is a small chunk of my current rules. Notice how there are multiple additional files sections with different combinations.
<?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'. --> <authoring-application name="PROE"> <!-- Additional files definitions --> <additional-files name="2D_IGES_DXF_PDF"> <file display-label="IGES" type="iges" default="true" output-prefix="IGES" /> <file display-label="DXF" type="dxf" default="true" output-prefix="DXF" /> <file display-label="PDF" type="pdf" default="true" output-prefix="PDF" /> </additional-files> <additional-files name="2D_PDF"> <file display-label="PDF" type="pdf" default="true" output-prefix="PDF" /> </additional-files> <additional-files name="3D_ASM_STEP"> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="AssemblyConfiguration" value="SingleFile" /> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> </additional-files> <additional-files name="3D_PRT_STEP"> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> </additional-files> <additional-files name="TM_ASSEMBLY_IGES_STEP_STL"> <file display-label="IGES" type="iges" default="true" output-prefix="IGES"> <option name="AssemblyConfiguration" value="SingleFile" /> <option name="ConvertGeometry" value="Solids|Quilts" /> </file> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="AssemblyConfiguration" value="SingleFile" /> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> <file display-label="STL" type="stl" default="true" output-prefix="STL"> <option name="ChordHeight" value="0.01" /> </file> </additional-files> <additional-files name="TM_PART_IGES_STEP_STL"> <file display-label="IGES" type="iges" default="true" output-prefix="IGES"> <option name="ConvertGeometry" value="Solids|Quilts" /> </file> <file display-label="STEP" type="step" default="true" output-prefix="STEP"> <option name="ConvertGeometry" value="Solids|Surfaces" /> </file> <file display-label="STL" type="stl" default="true" output-prefix="STL"> <option name="ChordHeight" value="0.01" /> </file> </additional-files> <!-- ================================================================== --> <!-- ======================= In Work ================================== --> <!-- ================================================================== --> <!-- 2D Creo objects that are allowed to be published at 'In Work' state --> <condition name="2D_Creo_Type_In_Work"> <and> <or> <attribute name="epmdoc_docType" value="Drawing"/> <attribute name="epmdoc_docType" value="Format"/> <attribute name="epmdoc_docType" value="Layout"/> </or> <attribute name="epmdoc_lifeCycleState" value="In Work"/> </and> </condition> <if condition="2D_Creo_Type_In_Work"> <publish on="create-representation" display-label="2D Manual Publish (CI01)" /> <publish on="create-representation" display-label="2D Manual Publish + PDF (CI01a)" additional-files="2D_PDF" /> <publish on="checkin" display-label="Check-in Publish (CI02)" /> <publish on="schedule" display-label="Scheduled Publish (CI03)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish (CI04)" /> </if> <!-- Creo parts that are allowed to be published at 'In Work' state --> <condition name="Creo_Parts_In_Work"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="In Work"/> </and> </condition> <if condition="Creo_Parts_In_Work"> <publish on="create-representation" display-label="3D Manual Publish (CI05)" /> <publish on="checkin" display-label="Check-in Publish (CI06)" /> <publish on="schedule" display-label="Scheduled Publish (CI07)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish (CI08)" /> </if> <!-- Creo assemblies that are allowed to be published at 'In Work' state --> <condition name="Creo_Assemblies_In_Work"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="In Work"/> </and> </condition> <if condition="Creo_Assemblies_In_Work"> <publish on="create-representation" display-label="3D Manual Publish (CI09)" /> <publish on="checkin" display-label="Check-in Publish (CI10)" /> <publish on="schedule" display-label="Scheduled Publish (CI11)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish (CI12)" /> </if> <!-- ================================================================== --> <!-- ======================= Released ================================= --> <!-- ================================================================== --> <!-- 2D Creo objects that are allowed to be published at 'Released' state, but without export data --> <condition name="2D_Creo_Type_Released_No_Export"> <and> <or> <attribute name="epmdoc_docType" value="Drawing"/> <attribute name="epmdoc_docType" value="Format"/> <attribute name="epmdoc_docType" value="Layout"/> </or> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_EXPORT_DATA" value="False"/> </and> </condition> <if condition="2D_Creo_Type_Released_No_Export"> <publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR01)" additional-files="2D_IGES_DXF_PDF" /> <publish on="create-representation" display-label="2D Manual Publish + PDF (CR02)" additional-files="2D_PDF" /> <publish on="schedule" display-label="Scheduled Publish + PDF (CR03)" additional-files="2D_PDF" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + PDF (CR04)" additional-files="2D_PDF" /> </if> <!-- 2D Creo objects that are allowed to be published at 'Released' state with export data --> <condition name="2D_Creo_Type_Released_With_Export"> <and> <or> <attribute name="epmdoc_docType" value="Drawing"/> <attribute name="epmdoc_docType" value="Format"/> <attribute name="epmdoc_docType" value="Layout"/> </or> <attribute name="epmdoc_lifeCycleState" value="Released"/> <!-- No EXPORT_DATA check required. Export unless explicitly set to "No". --> </and> </condition> <if condition="2D_Creo_Type_Released_With_Export"> <publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR05)" additional-files="2D_IGES_DXF_PDF" /> <publish on="schedule" display-label="Scheduled Publish + IGES/DXF/PDF (CR06)" additional-files="2D_IGES_DXF_PDF" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + IGES/DXF/PDF (CR07)" additional-files="2D_IGES_DXF_PDF" /> </if> <!-- Creo 'TM Parts' at 'Released' state in the Pre-Production context --> <condition name="Creo_TM_Parts_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_containerName" value="Pre-Production"/> <!-- No EXPORT_DATA check required. Export regardless of the value. --> </and> </condition> <if condition="Creo_TM_Parts_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR08)" additional-files="TM_PART_IGES_STEP_STL" /> <publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR09)" additional-files="TM_PART_IGES_STEP_STL" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR10)" additional-files="TM_PART_IGES_STEP_STL" /> </if> <!-- Creo parts that are allowed to be published at 'Released' state, but without export data --> <condition name="Creo_Parts_Released_No_Export"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_EXPORT_DATA" value="False"/> </and> </condition> <if condition="Creo_Parts_Released_No_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR11)" additional-files="3D_PRT_STEP" /> <publish on="create-representation" display-label="3D Manual Publish - No Export (CR12)" /> <publish on="schedule" display-label="Scheduled Publish - No Export (CR13)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish - No Export (CR14)" /> </if> <!-- Creo parts that are allowed to be published at 'Released' state with export data --> <condition name="Creo_Parts_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="CAD Part"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <!-- No EXPORT_DATA check required. Export unless explicitly set to "No". --> </and> </condition> <if condition="Creo_Parts_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR15)" additional-files="3D_PRT_STEP" /> <publish on="schedule" display-label="Scheduled Publish + STEP (CR16)" additional-files="3D_PRT_STEP" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + STEP (CR17)" additional-files="3D_PRT_STEP" /> </if> <!-- Creo 'TM Assemblies' at 'Released' state in the Pre-Production context --> <condition name="Creo_TM_Assemblies_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_containerName" value="Pre-Production"/> <!-- No EXPORT_DATA check required. Export regardless of the value. --> </and> </condition> <if condition="Creo_TM_Assemblies_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR18)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" /> <publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR19)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR20)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" /> </if> <!-- Creo assemblies that are allowed to be published at 'Released' state with export data --> <condition name="Creo_Assemblies_Released_With_Export"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <attribute name="epmdoc_EXPORT_DATA" value="True"/> </and> </condition> <if condition="Creo_Assemblies_Released_With_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR21)" additional-files="3D_ASM_STEP" /> <publish on="schedule" display-label="Scheduled Publish + STEP (CR22)" additional-files="3D_ASM_STEP" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish + STEP (CR23)" additional-files="3D_ASM_STEP" /> </if> <!-- Creo assemblies that are allowed to be published at 'Released' state, but without export data --> <condition name="Creo_Assemblies_Released_No_Export"> <and> <attribute name="epmdoc_docType" value="Assembly"/> <attribute name="epmdoc_lifeCycleState" value="Released"/> <!-- No EXPORT_DATA check required. Do NOT export unless explicitly set to "Yes". --> </and> </condition> <if condition="Creo_Assemblies_Released_No_Export"> <publish on="create-representation" display-label="3D Manual Publish + STEP (CR24)" additional-files="3D_ASM_STEP" /> <publish on="create-representation" display-label="3D Manual Publish - No Export (CR25)" /> <publish on="schedule" display-label="Scheduled Publish - No Export (CR26)" /> <!-- Publish when triggered by "Set State" or a Workflow Expression Robot. See CS158347 --> <publish on="unknown-source" display-label="Workflow Publish - No Export (CR27)" /> </if>
Ok thank you. I will also create combined rules then.
Hello,
thanks for your XML file. It is wery helpful. Could you explain me what is the epmdoc_EXPORT_DATA attribute? Thanks.
@BalazsToth wrote:
Could you explain me what is the epmdoc_EXPORT_DATA attribute?
It's a parameter in our CAD models (mapped to an attribute in Windchill) that is used as a switch to determine whether or not to generate export data (IGES, DXF, and STEP files) during publishing.
Thanks you @TomU .
You think that such attribute car be user to publish only one of DRW sheets ?
We usually put the DXF as the latest sheet of the drawing.
The targe is to publish:
Kind regards,
Haithem
Hi Haithem,
This is possible using INNEO's Genius Tools Worker.
Genuis Tools Model Processor | FELCO Solutions
Model Processor Worker is an off the shelf product that plugs into the Creo CAD Worker and generates additional files that get uploaded and put back in Windchill as Representation additional content.
It can read a parameter value from the model and decide what sheets to export to which formats.
We use it frequently to create sheet metal DXF flat state drawings. Users don't create the flat state drawings, we do that during publishing.