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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Visualization Configuration Administration - INVENTOR

Amirtharaj_K
15-Moonstone

Visualization Configuration Administration - INVENTOR

Hi Guys,

How can we enable both CAD files to be published at the same time? Can you tell me where/which we can used for Inventor? (Other CAD also)

 

Site.XConfig

<Property name="publish.usesPublishRules" overridable="true"
targetFile="codebase/wvs.properties"
value="ARBORTEXT PROE"/>

 

XML rules

<rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ptc.com" evaluate-rules-on-republish="true" xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd">
<authoring-application name="PROE">
<condition name="is_drawing">
<attribute name="epmdoc_CADName" regex=".*\.drw$"/>
</condition>
<condition name="is_cadpart">
<attribute name="epmdoc_CADName" regex=".*\.prt$"/>
</condition>
<additional-files name="publish_drawing">
<file display-label="pdf" type="pdf" default="true" output-prefix="pdf"/>
<file display-label="dxf" type="dxf" default="true" output-prefix="dxf"/>
</additional-files>
<additional-files name="publish_cadpart">
</additional-files>
<if condition="is_drawing">
<publish on="checkin" additional-files="publish_drawing"/>
<publish on="create-representation" additional-files="publish_drawing"/>
<publish on="schedule" 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"/>
</if>
</authoring-application>
</rules>

 

Regards,

AJ

1 ACCEPTED SOLUTION

Accepted Solutions
mmeadows-3
14-Alexandrite
(To:Amirtharaj_K)

Add Inventor to the file types using publish rules.

site.xconf

<Property name="publish.usesPublishRules" overridable="true"
targetFile="codebase/wvs.properties"
value="ARBORTEXT PROE INVENTOR"/>

 

Assuming the same rules for both Inventor and Creo...

1. Pull the additional files and conditions sections out of the Creo block.

2. Make the file types CAD independent by replacing your regular expressions with:

<attribute name="epmdoc_docType" value="Drawing"/>

<attribute name="epmdoc_docType" value="CAD Part"/>

3. Duplicate the remaining authoring-application block for Inventor.

 

Something like this...  Comments are for explanation and can be removed.

 

<rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ptc.com" evaluate-rules-on-republish="true" xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd">
	<!--
	Additional Files:
		Uncommented file elements and elements with visible="true" will appear for selection in the New Representation Wizard.
		display-label: Displayed in the second step of the New Representation Wizard.
		type: file type drives the extension
		default: Determines if the additional file type will be automatically generated.
			Displays in the New Representation wizard as either checked (true) or unchecked (false).
		Output file naming syntax: {output-prefix}_{filename}_{output-suffix}.{type}
			output-prefix: required
			output-suffix: optional
		visible: Determines if the additional file type will be available to check in the New Representation wizard.
	-->
	<!-- Publish drawings to PDF and DXF. -->
	<additional-files name="publish_drawing">
		<file display-label="pdf" type="pdf" default="true" output-prefix="pdf" visible="true"/>
		<file display-label="dxf" type="dxf" default="true" output-prefix="dxf" visible="true"/>
	</additional-files>
	<!-- Publish CAD parts to nothing. -->
	<additional-files name="publish_cadpart">
	</additional-files>
	<!-- Publish CAD parts to nothing. -->
	<additional-files name="publish_cadassembly">
	</additional-files>
	
	<!--
	Conditions:
		Example attributes for conditions
		epmdoc_docType values are the display name values from enumcustomize: wt\epm\EPMDocumentTypesRB (Drawing, CAD Part, Assembly)
			epmdoc_docType only includes file extensions that are allowed from property: publish.cadfileextensionfilter (ASM PRT DRW SLDASM SLDPRT SLDDRW IAM IPT IDW DWG)
		epmdoc_docSubType values are the display name values from enumcustomize: wt\epm\EPMDoSubTypeRB
			docSubType must be enabled first by ensuring it is not included in the property: edrload.propertyskiplist
		epmdoc_lifeCycleState values are the display name values from enumcustomize: wt\lifecycle\StateRB
		epmdoc_containerName values are the display name values of the product, library, and project contexts
		
	Notes:
		Conditions blocks should define mutually exclusive sets of data to avoid confusion in rules execution.
		See the Publish Rules notes for further clarification.
	-->
	<condition name="is_drawing">
		<attribute name="epmdoc_docType" value="Drawing"/>
	</condition>
	<condition name="is_cadpart">
		<attribute name="epmdoc_docType" value="CAD Part"/>
	</condition>
	<condition name="is_cadassembly">
		<attribute name="epmdoc_docType" value="Assembly"/>
	</condition>
	
	<!--
	Publish Rules:
		on="checkin": Triggered by Check In.
		on="create_representation": Select print rollers icon from Details tab of Information page, or Create Representation from the Representations table on the Content tab of the Information page.
		on="schedule": Submitted via publish scheduler
		on="unknown-source": triggered by workflow robots, state change, etc.
		on="manual-post": Enables UI pick to Post Publish from the Representations table on the Content tab of the Information page.
	
	Notes:
		Display labels should be unique per conditional block and publish on event for troubleshooting.
		Each rule set should apply a mutually exclusive conditions set.
		If there is overlap between applied conditions sets (e.g. sheet metal vs CAD Part), the first matching <if></if> block encountered is executed.
	-->
	<!-- Creo Parametric -->
	<authoring-application name="PROE">
		<if condition="is_drawing">
			<publish on="checkin" additional-files="publish_drawing"/>
			<publish on="create-representation" additional-files="publish_drawing"/>
			<publish on="schedule" 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"/>
		</if>
	</authoring-application>
	
	<!-- Inventor -->
	<authoring-application name="INVENTOR">
		<if condition="is_drawing">
			<publish on="checkin" additional-files="publish_drawing"/>
			<publish on="create-representation" additional-files="publish_drawing"/>
			<publish on="schedule" 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"/>
		</if>
	</authoring-application>
</rules>

 

 

 

 

 

 

View solution in original post

4 REPLIES 4
mmeadows-3
14-Alexandrite
(To:Amirtharaj_K)

Not sure we understand the question.  Are you asking how to modify the above configuration to support both Creo and Inventor?

Thanks for the replay @mmeadows-3 

I have already created a CAD Worker for both Creo and Inventor, and both are working fine. And also, I added the XML file to convert (One it's Publish automatically convert) from DRW to PDF and DXF for Creo. I want it to be the same as for Inventor.

Regards,

AJ

mmeadows-3
14-Alexandrite
(To:Amirtharaj_K)

Add Inventor to the file types using publish rules.

site.xconf

<Property name="publish.usesPublishRules" overridable="true"
targetFile="codebase/wvs.properties"
value="ARBORTEXT PROE INVENTOR"/>

 

Assuming the same rules for both Inventor and Creo...

1. Pull the additional files and conditions sections out of the Creo block.

2. Make the file types CAD independent by replacing your regular expressions with:

<attribute name="epmdoc_docType" value="Drawing"/>

<attribute name="epmdoc_docType" value="CAD Part"/>

3. Duplicate the remaining authoring-application block for Inventor.

 

Something like this...  Comments are for explanation and can be removed.

 

<rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ptc.com" evaluate-rules-on-republish="true" xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd">
	<!--
	Additional Files:
		Uncommented file elements and elements with visible="true" will appear for selection in the New Representation Wizard.
		display-label: Displayed in the second step of the New Representation Wizard.
		type: file type drives the extension
		default: Determines if the additional file type will be automatically generated.
			Displays in the New Representation wizard as either checked (true) or unchecked (false).
		Output file naming syntax: {output-prefix}_{filename}_{output-suffix}.{type}
			output-prefix: required
			output-suffix: optional
		visible: Determines if the additional file type will be available to check in the New Representation wizard.
	-->
	<!-- Publish drawings to PDF and DXF. -->
	<additional-files name="publish_drawing">
		<file display-label="pdf" type="pdf" default="true" output-prefix="pdf" visible="true"/>
		<file display-label="dxf" type="dxf" default="true" output-prefix="dxf" visible="true"/>
	</additional-files>
	<!-- Publish CAD parts to nothing. -->
	<additional-files name="publish_cadpart">
	</additional-files>
	<!-- Publish CAD parts to nothing. -->
	<additional-files name="publish_cadassembly">
	</additional-files>
	
	<!--
	Conditions:
		Example attributes for conditions
		epmdoc_docType values are the display name values from enumcustomize: wt\epm\EPMDocumentTypesRB (Drawing, CAD Part, Assembly)
			epmdoc_docType only includes file extensions that are allowed from property: publish.cadfileextensionfilter (ASM PRT DRW SLDASM SLDPRT SLDDRW IAM IPT IDW DWG)
		epmdoc_docSubType values are the display name values from enumcustomize: wt\epm\EPMDoSubTypeRB
			docSubType must be enabled first by ensuring it is not included in the property: edrload.propertyskiplist
		epmdoc_lifeCycleState values are the display name values from enumcustomize: wt\lifecycle\StateRB
		epmdoc_containerName values are the display name values of the product, library, and project contexts
		
	Notes:
		Conditions blocks should define mutually exclusive sets of data to avoid confusion in rules execution.
		See the Publish Rules notes for further clarification.
	-->
	<condition name="is_drawing">
		<attribute name="epmdoc_docType" value="Drawing"/>
	</condition>
	<condition name="is_cadpart">
		<attribute name="epmdoc_docType" value="CAD Part"/>
	</condition>
	<condition name="is_cadassembly">
		<attribute name="epmdoc_docType" value="Assembly"/>
	</condition>
	
	<!--
	Publish Rules:
		on="checkin": Triggered by Check In.
		on="create_representation": Select print rollers icon from Details tab of Information page, or Create Representation from the Representations table on the Content tab of the Information page.
		on="schedule": Submitted via publish scheduler
		on="unknown-source": triggered by workflow robots, state change, etc.
		on="manual-post": Enables UI pick to Post Publish from the Representations table on the Content tab of the Information page.
	
	Notes:
		Display labels should be unique per conditional block and publish on event for troubleshooting.
		Each rule set should apply a mutually exclusive conditions set.
		If there is overlap between applied conditions sets (e.g. sheet metal vs CAD Part), the first matching <if></if> block encountered is executed.
	-->
	<!-- Creo Parametric -->
	<authoring-application name="PROE">
		<if condition="is_drawing">
			<publish on="checkin" additional-files="publish_drawing"/>
			<publish on="create-representation" additional-files="publish_drawing"/>
			<publish on="schedule" 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"/>
		</if>
	</authoring-application>
	
	<!-- Inventor -->
	<authoring-application name="INVENTOR">
		<if condition="is_drawing">
			<publish on="checkin" additional-files="publish_drawing"/>
			<publish on="create-representation" additional-files="publish_drawing"/>
			<publish on="schedule" 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"/>
		</if>
	</authoring-application>
</rules>

 

 

 

 

 

 

Thanks for the your help, it's working now. @mmeadows-3 

Top Tags