Skip to main content
14-Alexandrite
January 17, 2020
Question

Windchill publish rule without prefix from DRW

  • January 17, 2020
  • 2 replies
  • 2944 views

Hi,

My client wants that generated PDF and DXF from DRW should have the same name as the primary file. Now it looks like this:

 

MattPat_0-1579257805278.png

 

Files should be named testpart.dxf and testpart.pdf without prefix "dxf_" and suffix "_drw".

My publish rule look like this:

Spoiler
<rules xmlns="http://www.ptc.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ptc.com/PublishRulesSchema.xsd"> 
	<authoring-application name="PROE"> 
		<additional-files name="DrawingPDF"> 
			<file display-label="PDF" type="pdf" default="true" output-prefix="pdf"/> 
			<file display-label="DXF" type="dxf" default="true" output-prefix="dxf"/>
		</additional-files> 
		<param-set name="Share with WTDocumentReleased Drawing"> 
			<post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish> 
			<post-publish name="published-content-link">pdf</post-publish> 
			<post-publish name="name">{EPM_NAME}</post-publish> 
			<!-- <post-publish name="lifecycle-state">RELEASED</post-publish> -->
			<post-publish name="lifecycle-template">Basic</post-publish> 
			<post-publish name="type">wt.doc.WTDocument</post-publish> 
			<post-publish name="folder">/default/PDFs</post-publish> 
			<post-publish name="additional-file-primary">.*\.pdf</post-publish>
			<post-publish name="additional-file-secondary">.*\.dxf</post-publish>
		</param-set> 
		<condition name="IS_Drawing"> 
			<attribute name="epmdoc_name" regex=".*\.drw" /> 
			<!-- <attribute name="epmdoc_lifeCycleState" value="Released"/> -->
		</condition> 
		<if condition="IS_Drawing"> 
			<publish evaluate-rules-on-republish="true" additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="create-representation"/> 
			<publish evaluate-rules-on-republish="true" additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="schedule"/> 
			<publish evaluate-rules-on-republish="true" additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="checkin"/> 
			<publish evaluate-rules-on-republish="true" additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="unknown-source"/>
			<!-- <publish evaluate-rules-on-republish="true" additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="manual-post"/> -->
		</if> 
		<publish evaluate-rules-on-republish="true" on="checkin"/> 
		<publish evaluate-rules-on-republish="true" on="create-representation"/> 
		<publish evaluate-rules-on-republish="true" on="schedule"/> 
		<publish evaluate-rules-on-republish="true" on="unknown-source"/> 
		<publish evaluate-rules-on-republish="true" on="manual-post"/>
	</authoring-application> 
</rules> 

Thank you for help. 

2 replies

MattPat14-AlexandriteAuthor
14-Alexandrite
January 17, 2020

I see that value output-prefix is mandatory. Is it any way to solve it ? 

17-Peridot
January 17, 2020

The only possibility I'm aware of ist to create an AfterEDRLoader like described in the case CS216668.

MattPat14-AlexandriteAuthor
14-Alexandrite
January 17, 2020

Thank you for the quick response. Why PTC can't allow it to make in publish rule. It doesn't make sense. I have to create file and another method will only change the name of this file.