Introduction
Autodesk Vault uses an Engineering Change Order or Engineering Change Notice to record events in a change management cycle and controls how design changes are managed and released. Change Orders can be created to describe changes to a design as well as manage the progression of that Change Order as it is reviewed, approved, or rejected. Change Orders provide a historical record of why, how, and when changes were made.
A Change Order generally contains an overview, files or items controlled by the Change Order, comments, attached files, routing path and status. Often a change order needs to be distributed to the stake holders with no access to Vault.
ECO Printing
A summary of any Change Order can be printed from Vault Client. The summary can be customized to include/exclude a title and other specific details of the change order such as files and items that are associated with the change order, the routing list for the change order, and so on. The default print template captures requested information in the selected ECO/ECN. The Change Order summary is displayed in a print preview window and can be sent to a printer.
But many times you may want the print format to include a standard logo or text and most firms may want th print to be formatted in a familiar format that was followed in earlier processes. With a little HTML and XSL skills, most formats can be replicated.
Print Template Customization
The template file used to transform the ECO/ECN information to a print format is in the following path, which is an XSLT file.
%Program Files%\Autodesk\Vault Professional 2013\Explorer\ECOReportTemplate.xslt
The XSLT processor converts source information, plus one or more XSLT stylesheet modules, and processes them to produce an output document. This XSLT template file needs to be modified if you want to make any changes to the default format. Here are a few examples of what can be done:
Company Name
You may want to have your company name included in the report every time, which involves just adding the required HTML code as below to the template file.
Code Snippet to include a standard company name format:
<?xml
version="1.0"
encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template
match="/ECOReport">
<html>
<head>
<style
type="text/css">
……..
</style>
</head>
<body>
<!--New HTML code to add your company name in a table-->
<table
border="1"
cellpadding="5">
<tr
style="font-family: Verdana; font-size: 13px; font-weight: bold">
<td
align="center"
style="height: 40px">
AUTODESK CONSULTING.
</td>
<td
align="center"
style="height: 40px">
ENGINEERING CHANGE ORDER REQUEST.
</td>
</tr>
</table>
<br/> <!--End of HTML code to Addd your company name in a table heading-->
……..
Conditions using xsl:if
For some simple conditional statements (let's say you want to print a message if there are no attachments, you can make use of xsl:if conditions
<xsl:if
test="count(AttachedFilesData/AttachedFiles/AttachedFile) = 0">
<div
class="SectionHeader"> No Attachments for this Change Order
</div>
</xsl:if>
Combined Example
The default template displays the standard properties and custom properties grouped separately. You may want to mix and match custom properties with other standard properties in your own familiar format.
The below snippet will show the following:
- Showing only selective properties rather than all properties in the view by making use of the xsl:template feature and conditional statements
- Make use of "mode" feature in xsl to choose between different properties for different sections of the report based on the input.
- Display specific standard and custom property together in a table.
<xsl:template
match="/ECOReport">
<html>
<head> … </ head>
<body>
…
<!--Start Section 1-->
<!--HTML code for a new section that displays standard property "Change order number" and a custom property "Distribute To"-->
<table
width="100%"
cellpadding="1"
cellspacing="1"
border="1">
<tr
style="font-family: Verdana; font-size: 12px; font-weight: bold">
<th
class="TableHeader">
SECTION 1
</th>
</tr>
</table>
<table
cellspacing="0px"
class="PropertyBorder">
<xsl:if
test="count(ECOProperties/Property)">
<!--Calling the template
ECOProperties/Property that display "Change Order number"-->
<xsl:apply-templates
select="ECOProperties/Property"/>
</xsl:if>
<xsl:if
test="count(Properties/Property)">
<!--Calling the template
Properties/Property with mode parameter that will display "Distribute To"-->
<xsl:apply-templates
select="Properties/Property"
mode="SectionI"/>
</xsl:if>
</table>
<!--End Section 1-->
<!--Start Section 2-->
<!--HTML code for a new section that displays 3 custom properties-->
<table
width="100%"
cellpadding="1"
cellspacing="1"
border="1">
<tr
style="font-family: Verdana; font-size: 12px; font-weight: bold">
<th
class="TableHeader">
SECTION 2
</th>
</tr>
</table>
<table
cellspacing="0px"
class="PropertyBorder">
<xsl:if
test="count(Properties/Property)">
<!--Calling the template
Properties/Property with a different mode parameter that will display 3 properties-->
<xsl:apply-templates
select="Properties/Property"
mode="SectionII"/>
</xsl:if>
</table>
<!--End Section 2-->
…
</body>
</html>
</xsl:template>
<!—Template to display standard property "Change order Number"-->
<xsl:template
match="ECOProperties/Property">
<xsl:if
test="@displayName = 'Change Order Number:'">
<tr>
<xsl:choose>
<xsl:when
test="position() mod 2 != 0">
<xsl:attribute
name="class">Alternating1</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute
name="class">Alternating2</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<td
nowrap="nowrap"
class="PropertyLabel">
<xsl:text>ECN NO.</xsl:text>  
</td>
<td
class="RightBorder">
<xsl:value-of
select="./Value"/> 
</td>
</tr>
</xsl:if>
</xsl:template>
<!—Template to display custom property "Distribute To". Mode used to distinguish parameters-->
<xsl:template
match="Properties/Property"
mode="SectionI">
<xsl:if
test="@displayName = 'Distribute To'">
<tr>
<xsl:attribute
name="class">Alternating1</xsl:attribute>
<td
nowrap="nowrap"
class="PropertyLabel">
<xsl:value-of
select="@displayName"/> 
</td>
<td
class="RightBorder">
<xsl:value-of
select="./Value"/> 
</td>
</tr>
</xsl:if>
</xsl:template>
<!—Template to display custom property "From","To" and "Date". Mode used to distinguish parameters -->
<xsl:template
match="Properties/Property"
mode="SectionII">
<xsl:if
test="@displayName = 'From' or @displayName = 'To' or @displayName = 'Date'">
<tr>
<xsl:attribute
name="class">Alternating1</xsl:attribute>
<td
nowrap="nowrap"
class="PropertyLabel">
<xsl:value-of
select="@displayName"/> 
</td>
<td
class="RightBorder">
<xsl:value-of
select="./Value"/> 
</td>
</tr>
</xsl:if>
</xsl:template>
Printing
To see the background colours in the print template, if you have one, make sure the Page setup option to display the background colours is turned on.
Finally
Make a backup of the default template file before making your changes.
For more XSL learning visit W3 Schools XSL
Note that the template file is part of the Vault client installation and needs to be rolled out to all client machines.