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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Publishing of Additional Files for specific CAD Document types only in Released State not working

nbojcetic
11-Garnet

Publishing of Additional Files for specific CAD Document types only in Released State not working

I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.1.2

When applying solution from Article - CS362383 the example is not working as expected.
For drawings the pdf file is created regardless of drawing object state.
For CAD parts and CAD assembly step files are not created in any state.

Here are the errors that I faced
publishing rules are not evaluated as expected

ACCEPTED SOLUTION

Accepted Solutions
jbailey
17-Peridot
(To:nbojcetic)

Check your spelling and case (this is case sensitive) ... should be epmdoc_lifeCycleState not epmdoc_liveCycleState (the file you attached doesn't match what you pasted in the post)

jbailey_0-1682518619854.png

 

View solution in original post

9 REPLIES 9
HelesicPetr
22-Sapphire I
(To:nbojcetic)

Hi @nbojcetic 

Provide your xml configuration for the publish rules.

 

For your information, if you use different language in Windchill you need to specify all conditions in specific languages

 

PetrH

Hi,

thank you all for your answers. Well my xml file is (we are using US English):

it is copy from CS362383 with small change regading step and pdf. If I lose check for Release state
I can, manually create both output files, but when check is in place and objects are in right state it

does not work as expected.

 

<?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">
<condition name="is_drawing">
<and>
<attribute name="epmdoc_liveCycleState" value="Released"/>
<attribute name="epmdoc_CADName" regex=".*\.drw$"/>
</and>
</condition>

<condition name="is_cadpart">
<and>
<attribute name="epmdoc_liveCycleState" value="Released"/>
<attribute name="epmdoc_CADName" regex=".*\.prt$"/>
</and>
</condition>

<condition name="is_asm">
<and>
<attribute name="epmdoc_liveCycleState" value="Released"/>
<attribute name="epmdoc_CADName" regex=".*\.asm$"/>
</and>
</condition>

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

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

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

<if condition="is_drawing">
<publish on="checkin" additional-files="publish_drawing" />
<publish on="schedule" additional-files="publish_drawing" />
<publish on="create-representation" additional-files="publish_drawing" />
<publish on="unknown-source" additional-files="publish_drawing" />
</if>

<if condition="is_cadpart">
<publish on="checkin" additional-files="publish_cadpart" />
<publish on="create-representation" additional-files="publish_cadpart" />
<publish on="schedule" additional-files="publish_cadpart" />
<publish on="unknown-source" additional-files="publish_cadpart" />
</if>

<if condition="is_asm">
<publish on="checkin" additional-files="publish_cadasm" />
<publish on="create-representation" additional-files="publish_cadasm" />
<publish on="schedule" additional-files="publish_cadasm" />
<publish on="unknown-source" additional-files="publish_cadasm" />
</if>

<publish on="checkin"/>
<publish on="create-representation"/>
<publish on="schedule"/>
<publish on="unknown-source"/>
<publish on="manual-post"/>
</authoring-application>

</rules>

 

Best regards!

Nenad

jbailey
17-Peridot
(To:nbojcetic)

Check your spelling and case (this is case sensitive) ... should be epmdoc_lifeCycleState not epmdoc_liveCycleState (the file you attached doesn't match what you pasted in the post)

jbailey_0-1682518619854.png

 

Dobi
16-Pearl
(To:jbailey)

With Creo you can also take advantage of the epmdoc_docType attribute instead of doing regex for separating out drawings, parts and assemblies, for what it's worth. Unless you're running NX and your definitions for drawings vary but the file extension is always .prt. 

What @jbailey said though is probably what's not registering. 

 

Dobriša

Hi jbailey,

that's it, a typo, now it works. Thank you very much. I didn't see it, blinded by code 🙂

 

Best regards,

Nenad

Dobi
16-Pearl
(To:nbojcetic)

It depends how you have the rules structured. Like @HelesicPetr said, if you add a bit of your publish rules it would be more informative.

Your conditions need to be pretty accurate based on what your desired result is. 

Here's a snippet that works:

Condition is "Released_Part" and on that condition there are certain triggers. 

Order of things matters for fall through matching. 

Dobi_0-1682437419631.png

 

nbojcetic
11-Garnet
(To:Dobi)

Hi Dobi,

thank you for your answer. In my xml (the whole xml file can be seen in other post) first I did

conditions like:

 

<condition name="is_drawing">
<and>
<attribute name="epmdoc_liveCycleState" value="Released"/>
<attribute name="epmdoc_CADName" regex=".*\.drw$"/>
</and>
</condition>

<condition name="is_cadpart">
<and>
<attribute name="epmdoc_liveCycleState" value="Released"/>
<attribute name="epmdoc_CADName" regex=".*\.prt$"/>
</and>
</condition>

<condition name="is_asm">
<and>
<attribute name="epmdoc_liveCycleState" value="Released"/>
<attribute name="epmdoc_CADName" regex=".*\.asm$"/>
</and>
</condition>

 after that I check if condition is true:

<if condition="is_drawing">
		<publish on="checkin" additional-files="publish_drawing" />
		<publish on="schedule" additional-files="publish_drawing" />
		<publish on="create-representation" additional-files="publish_drawing" />
		<publish on="unknown-source" additional-files="publish_drawing" />
	</if>

	<if condition="is_cadpart">
		<publish on="checkin" additional-files="publish_cadpart" />
		<publish on="create-representation" additional-files="publish_cadpart" />
		<publish on="schedule" additional-files="publish_cadpart" />
		<publish on="unknown-source" additional-files="publish_cadpart" />
	</if>

	<if condition="is_asm">
		<publish on="checkin" additional-files="publish_cadasm" />
		<publish on="create-representation" additional-files="publish_cadasm" />
		<publish on="schedule" additional-files="publish_cadasm" />
		<publish on="unknown-source" additional-files="publish_cadasm" />
	</if>

Also at the top of the file evaluation of rules is set: evaluate-rules-on-republish="true"

 

What I tried was the following:

  1. created part in CREO upon check-in pvs file was created ok, no step
  2. created drawing from the part upon check-in pvs file was created ok, but pdf file was also created
  3. changed state of the part cad document to Released and run republish -> pvs was created ok, but no step file
  4. changed state of the drawing to Released and run republish -> pvs was created ok, and pdf also

Best regards,

Nenad

 

 

jbailey
17-Peridot
(To:nbojcetic)

@nbojcetic - check your spelling... its lifecycle not livecycle  ... also be careful with capitalization/syntax

jbailey
17-Peridot
(To:nbojcetic)

Right or wrong this is what our first go looked like to publish PDF's for released drawings. One thing we found out though, was that our users needed stuff at other states as well, especially when they needed PDF's to be reviewed by outside folks during promotions/change task approvals. Something else we found was that case matters on the expressions when searching for filenames.  This was something made apparent with our Solidworks publishing.  .*\slddrw$ wouldnt publish a file that was MySWFile.SLDDRW but would publish MySWFile.slddrw

 

 

 

 
 

pubrules.jpg

 

 

 

 

 

 

Announcements


Top Tags