Specialized Administration > Supporting Visualization and Publishing > WVS Publish Rules > Using Conditions in Publish Rules > Additional File Types Elements
  
Additional File Types Elements
To configure the generation of additional file types during publishing, use the following elements in the Publish Rules XML:
file and additional-Files
Refer to the sample PublishRules-AdditionalFiles.xml file in the <Windchill>/codebase/com/ptc/wvs/server/xml directory, for simple examples of these publish rules XML elements.
File — Each additional file type that can be generated is represented by a <file> element, for example:
<file display-label="My IGES File" type="iges" output-prefix="2d" output-suffix=”001”default="true" />
Where:
display-label is the label exposed in the UI, for instance Additional Files in the second step of the New Representation wizard.
type is the additional file type that the worker is asked to export.
output-prefix and output-suffix add a prefix or a suffix to the additional file name in the generation of additional files during publishing. output-suffix is optional.
default—Defines whether this is a default file type for publishing. For create-representation publish requests using the Windchill New Representation wizard, this attribute identifies the additional file types to preselect for output. For check in and the other publishing request types, it identifies those additional file types to publish.
default=true—Pre-selected in the New Representation wizard, but automatically output by the other publishing request types.
default=false—Not pre-selected in the New Representation wizard and not automatically output by the other publishing request types.
Each <file> element can also have visible and locked elements within its definition that interact with the default element for create-representation publish requests, for instance when using the Windchill New Representation wizard.
visible determines whether an additional file type is displayed in the Additional Files list.
locked defines whether the user can select the output of an additional file type or not. Setting locked=true removes the check box from the Additional Files list, preventing the default setting in the <file> element from being changed. If set to locked=false, the check boxes are displayed.
The settings of these two elements, together with default provide different outputs and displays, as shown in the examples below.
The file is displayed in the Additional Files list and is published. There is no check box next to the file name, so the user cannot alter the settings.
default="true" locked="true" visible="true"
The file is published, the file name is not displayed, and therefore not selectable by the user. (Locked is inconsequential as the user can’t change the setting of something that he can’t see.)
default="true" locked="true" visible="false"
default="true" locked="false" visible="false"
The file is displayed in the Additional Files list. The user can select or clear the check box next to the file name to publish the file or not.
default="true" locked="false" visible="true"
The file is not published and not displayed. The user cannot take any action.
default="false" locked="true visible="false"
Each <file> element can also have a number of <option> elements within its definition. These <option> elements are used to pass additional application export settings to the worker, for example:
<file display-label="iges 2D" type="iges" default="true" output-prefix="2d">
<option name="output_2d" value="true" />
</file>
There can be any number of <option> elements, but the actual “name” and “value” of the option must be something that is recognized by the worker. The file type options that are supported by the worker are documented for each adapter in the Creo View MCAD Adapter Installation and Configuration Guide.
Additional Files — Each <file> element is contained within a list of additional file types to be exported, and defined using the <additional-files> element as shown below.
<additional-files name="iges_files">
<file display-label="iges 2D" type="iges" default="true" outputPrefix="2d">
<option name="output_2d" value="true" />
</file>
<file display-label="iges 3D" type="iges" default="false" outputPrefix="3d">
<option name="output_2d" value="false" />
</file>
</additional-files>
The “name” attribute is used to reference this additional file types definition in other elements (see the <publish> element below). There can be any number of <file> elements contained within the list of <additional-files>.
<additional-files> elements can be used in two ways:
Under the root <rules> element—Applies to all <authoring-application> elements.
Under one specific <authoring-application> element—Applies to the <authoring-application> rules for that specific Authoring Application only.
Reference from within a <publish> element— To reference an additional-files definition, add the additional-files attribute to the <publish> element, specifying its name as shown below.
<publish display-label=”iges files” on="checkin" additional-files="iges_files"/>
This attribute can also be used in combination with the param-set and output attributes.
Since param-set, output, and additional-files are all part of a specific <publish> element, they are closely aligned. However, the param-set and output attributes are used for post-publishing activity (e.g., Arbortext), and additional-files is used during the actual publish (mainly CAD publishing and Multi-fidelity publishing) so the two cannot be used together that often. The output attribute cannot be combined with the additional-files attribute. Also note the introduction of the display-label attribute to the publish element. The display-label attribute’s value is displayed in the Creo View Output Options list in the New Representation wizard during a create-representation publishing request.
If there is only one <publish on=”create-representation"> element, only that option is displayed; but if there are more than one <publish on=create-representation> elements, each one is a separate output option, and an additional option called All is displayed at the top. If you choose the option All, a separate job is created for each <publish on=create-representation> element; if you pick anything but All, only the selected <publish on=”create-representation"> element (and corresponding additional-files) is honored.
If you specify a display-label then that is the default for the representation description. If you do not want to have a description set on the representation, set.
display-label=””
When no display-label is specified for a <publish on=create-representation> element, a concatenation of param-set, additional-files, and evaluate-rules-on-republish attributes is used as the display name. The example below includes two <publish on=”create-representation"> elements, one with a display label and one without.
<publish on="create-representation" additional-files="dxf_iges_step_files">
<param-set-ref name="PostPublish_STEP" />
<param-set-ref name="PostPublish_IGES_DXF" />
</publish>

<publish on="create-representation" display-label="Fred's Publish Options"
additional-files="dxf_iges_step_files">
<param-set-ref name="PostPublish_STEP" />
<param-set-ref name="PostPublish_IGES_DXF" />
</publish>