Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Version: Windchill 13.0
Use Case: Republish is not working - Publish will work only when we do check in and check out. Windchill version is Release: 13.0.2.6 I checked online and tried adding below lines to xml. OR · It says our Windchill version does not support on="republish" or on="manual-post" in publishrules.xml. You cannot fix this by editing XML. To get PDF/STEP on republish, you need either: A check-in/schedule trigger, or A custom workflow/JPO that explicitly calls the publishing API.
<publish on="manual-post" additional-files="publish_drawing"/>
OR
<publish on=" republish" additional-files="publish_drawing"/>
Description:
Attached xml file used. Ca you help on this.
I don't think `republish` is an option. That's a retriggering of a previously published representation.
WVS Publish Rules - Enabling Publish Rules :
Manual post ought to be supported (we're on 13.0.2.1).
<param-set name="Published CREO drawing">
<post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish>
<post-publish name="name">{ADDITIONAL_FILE_PRIMARY_BASENAME}_drawing</post-publish>
<post-publish name="published-content-link">true</post-publish>
<post-publish name="type">com.xxx.www.someDocument</post-publish>
<!-- or a soft type of WTDocument -->
<post-publish name="additional-file-primary">.*\.pdf</post-publish>
<post-publish name="folder">Documentation</post-publish>
</param-set>
<!-- this generates the standalone illustration graphic for Creo illustrate -->
<param-set name="Create PROE to PVZ">
<post-publish name="delegate">com.ptc.wvs.server.publish.EPMPostPublishDelegate</post-publish>
<post-publish name="name">{EPM_NUMBER} (PostPublish)</post-publish>
<post-publish name="type">wt.epm.EPMDocument|com.xxx.www.DynamicDocument|com.ptc.IllustrationSource</post-publish>
<post-publish name="published-content-link">true</post-publish>
<post-publish name="viewable-compression">false</post-publish>
<post-publish name="folder">Documentation/Graphics/Illustration Sources</post-publish>
</param-set>
...
<if condition="Drawing">
<publish on="checkin" additional-files="Drawing_PDFs" display-label="Drawing check-in w/ PDF"/>
<publish on="manual-post" param-set="Published CREO drawing"/>
<publish on="create-representation" additional-files="Drawing_PDFs" display-label="Drawing create rep w/ additional file option"/>
<publish on="unknown-source" additional-files="Drawing_PDFs" display-label="Drawing state change publish w/ default additional files"/>
</if>
<if condition="Assembly and Part">
<publish on="create-representation" additional-files="Part_STEP" display-label="Model create rep publish with STEP option"/>
<publish on="unknown-source" additional-files="Part_STEP" display-label="Model state change publish w/ STEP"/>
<publish on="manual-post" param-set="Create PROE to PVZ"/>
<publish on="schedule" additional-files="Part_STEP" display-label="Scheduled publish"/>
</if>
Thanks for the input and code. I copied your code and did attached new xml file but did republish the file not generating the pdf/step file. Attached copy of xml file. Post publish is not working.
Post Publishing Succeeded with Warnings
Warning: there are no additional files in the representation to post publish |
The pdf/step is generated at initial publish. When it's created successfully, you'll see something like this:
Republish will just rerun whatever was used previously for that representation. It looks like your additional files aren't getting created. What's your WVS job monitor log look like for this?
Here is my WVS job monitor.
Your additional files aren't getting created.
Are your publish rules set at the site level or a particular context?
Site Level
Looks correct...
Maybe a silly thing but does it work the same if you have your <additional files> section first and then <conditions>?
When we do check in and check out the CAD files in windchill, the publisher works. It generates pdf and step file.
We implemented this publisher recently. I want to get republisher works for all parts released in windchill system, so it generates step files and pdf files.
I tried to checkout all CAD documents (admin login) in windchill and try to checkin all CAD documents. Since we have no changes to CAD documents, I can't check in without any modification.
If the publisher works to generate a pdf and step file then you ought to be seeing those files in your representations table.
Are you wanting to have the additional file be created as a stand-alone document that's linked to the original?
Yes, I want the republish to work as same as when we do check in and check out.
Also, can we move/make a copy the stp and pdf files generated to attachments tab.
To move/make a copy of the step and pdf files and have them be in attachments, look at the AfterEDRLoader.
https://www.ptc.com/en/support/article/CS349681
The older version did this for sure.
Regarding the republish:
If your additional files are getting created just fine on check-in, the publish rules are working fine. Republish just reruns a particular job. In your case, if that's failing to create the file, something else is wrong.
Do you have an example of a file where the pdf was generated correctly?
Here is the example of pdf /step file generated when we do check and check out.
Also I tried to move pdf/steps created to attachment category in windchill. I followed the same steps mentioned in the link provided. the error msg attached below.
On your 10469.drw and 10470.prt examples, if you republish it ought to generate the same output. That's what republish does.
We have an older rev of the AfterEDRLoader running that had options through wvs.properties to add the pdf/step as attachment. I'll look at the latest version some more.
Instead of adding the pdfs at attachments, we're going to route of having them exist as stand-alone WTDocuments because they are easier to access and collect for downstream operations in ERP and elsewhere.
For your "adding files to attachments", this is what you want:
https://www.ptc.com/en/support/article/CS348848
You set the property in wvs.properties to copy to EPM and it will add the published content you specify to the Attachments table automatically on publish.
Hi @PN_10839578,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag
