Turnout point report (shunt limits)

Hi all!

When creating turnout reports, the "TurnoutPoint" representing shunt limit (or fouling point) is displayed as "53".

Is there any way to change this to something more descriptive?

  • No there is no setting to change the code for turnout points (.0 .1 .2 .3 .53).
    One way could be coding in the xsl to test for point name and write the appropriate name.



  • Thanks for replying.
    My xsl writing is not the strongest, could someone help me with a codestring for search and replace?
  • <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:inr="http://mycompany.com/mynamespace">
    	<xsl:include href="../format.xsl"/>
    	<xsl:param name="xslRootDirectory" select="inr:xslRootDirectory"/>
    	<xsl:template match="/">
    		<xsl:variable name="gridOut" select="inr:SetGridOut(number(InRoads/@outputGridScaleFactor))"/>
    		<html>
    			<head>
    				<link rel="stylesheet" type="text/css" href="{$xslRootDirectory}/_Themes/engineer/theme.css"/>
    				<title lang="en">Shunt Limits Report</title>
    			</head>
    			<body>
    				<xsl:choose>
    					<xsl:when test="$xslShowHelp = 'true'">
    						<xsl:call-template name="StyleSheetHelp"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:for-each select="InRoads">
    							<center>
    								<h2 lang="en">Shunt Limits Report</h2>
    								<p lang="en">
                                        Report Created:&#xa0; <xsl:value-of select="inr:date()"/>
    									<br/>
                                        Time:&#xa0; <xsl:value-of select="inr:time()"/>
    								</p>
    							</center>
    							<xsl:for-each select="GeometryProject">
    								<table class="margin" cellpadding="2" width="90%">
    									<tbody>
    										<tr>
    											<th align="right" lang="en">Project:&#xa0; </th>
    											<td align="left" colspan="2">
    												<xsl:value-of select="@name"/>
    											</td>
    										</tr>
    										<tr>
    											<th align="right" lang="en">Description:&#xa0; </th>
    											<td align="left" colspan="2">
    												<xsl:value-of select="@description"/>
    											</td>
    										</tr>
    										<tr>
    											<th align="right" lang="en" style="font-size: 80%">Input Grid Factor:&#xa0; </th>
    											<td align="left" style="font-size: 80%">
    												<xsl:value-of select="../@inputGridScaleFactor"/>
    											</td>
    											<td align="right" lang="en" style="font-size: 80%">
    												<strong>Note:&#xa0; </strong>All units in this report are in
                                                    <xsl:if test="//@linearUnits = 'Imperial'">feet</xsl:if>
    												<xsl:if test="//@linearUnits = 'Metric'">meters</xsl:if>
                                                    unless specified otherwise.
                                                </td>
    										</tr>
    									</tbody>
    								</table>
    								<hr/>
    								<xsl:for-each select="Turnout">
    									<table class="margin" cellpadding="1" width="90%">
    										<tbody>
    											<tr>
    												<td align="left" colspan="6" lang="en">
    													<strong>Turnout:&#xa0; </strong>
    													<xsl:value-of select="@name"/>
    													<xsl:text>&#xa0;</xsl:text>
    													<xsl:value-of select="@description"/>
                                                        (<xsl:value-of select="@style"/>)
                                                    </td>
    											</tr>
    											<xsl:apply-templates/>
    										</tbody>
    									</table>
    									<hr/>
    								</xsl:for-each>
    							</xsl:for-each>
    						</xsl:for-each>
    					</xsl:otherwise>
    				</xsl:choose>
    			</body>
    		</html>
    	</xsl:template>
    	<xsl:template match="HorizontalLine">
    		<xsl:if test="position() = 1 or preceding-sibling::*[1][name() = 'TurnoutBranchGeometry']">
    			<tr>
    				<th align="left" colspan="2" lang="en" valign="bottom">Element Type</th>
    				<th align="right" lang="en" valign="bottom">Length</th>
    				<th align="right" lang="en" valign="bottom">Start Radius</th>
    				<th align="right" lang="en" valign="bottom">End Radius</th>
    				<th align="right" lang="en" valign="bottom">Start Northing</th>
    				<th align="right" lang="en" valign="bottom">Start Easting</th>
    			</tr>
    		</xsl:if>
    		<tr>
    			<td align="left" colspan="2" lang="en">Linear</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(@length), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(0.), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(0.), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:northingFormat(number(Start/@northing), $xslNorthingPrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:eastingFormat(number(Start/@easting), $xslEastingPrecision)"/>
    			</td>
    		</tr>
    	</xsl:template>
    	<xsl:template match="HorizontalCircle">
    		<xsl:if test="position() = 1 or preceding-sibling::*[1][name() = 'TurnoutBranchGeometry']">
    			<tr>
    				<th align="left" colspan="2" lang="en" valign="bottom">Element Type</th>
    				<th align="right" lang="en" valign="bottom">Length</th>
    				<th align="right" lang="en" valign="bottom">Start Radius</th>
    				<th align="right" lang="en" valign="bottom">End Radius</th>
    				<th align="right" lang="en" valign="bottom">Start Northing</th>
    				<th align="right" lang="en" valign="bottom">Start Easting</th>
    			</tr>
    		</xsl:if>
    		<tr>
    			<td align="left" colspan="2" lang="en">Circular</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(@length), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(@radius), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(@radius), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:northingFormat(number(Start/@northing), $xslNorthingPrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:eastingFormat(number(Start/@easting), $xslEastingPrecision)"/>
    			</td>
    		</tr>
    	</xsl:template>
    	<xsl:template match="HorizontalSpiral">
    		<xsl:if test="position() = 1 or preceding-sibling::*[1][name() = 'TurnoutBranchGeometry']">
    			<tr>
    				<th align="left" colspan="2" lang="en" valign="bottom">Element Type</th>
    				<th align="right" lang="en" valign="bottom">Length</th>
    				<th align="right" lang="en" valign="bottom">Start Radius</th>
    				<th align="right" lang="en" valign="bottom">End Radius</th>
    				<th align="right" lang="en" valign="bottom">Start Northing</th>
    				<th align="right" lang="en" valign="bottom">Start Easting</th>
    			</tr>
    		</xsl:if>
    		<tr>
    			<td align="left" colspan="2">
    				<xsl:value-of select="@type"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(@length), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(@startRadius), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(@endRadius), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:northingFormat(number(Start/@northing), $xslNorthingPrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:eastingFormat(number(Start/@easting), $xslEastingPrecision)"/>
    			</td>
    		</tr>
    	</xsl:template>
    	<xsl:template match="TurnoutPoint">
    		<xsl:if test="preceding-sibling::*[1][name() != 'TurnoutPoint']">
    			<tr>
    				<th align="left" lang="en" valign="bottom">Point Name</th>
    				<th align="left" lang="en" valign="bottom">Mainline<br/>Alignment</th>
    				<th align="left" lang="en" valign="bottom">Style</th>
    				<th align="right" lang="en" valign="bottom">Station</th>
    				<th align="right" lang="en" valign="bottom">Offset</th>
    				<th align="right" lang="en" valign="bottom">Northing</th>
    				<th align="right" lang="en" valign="bottom">Easting</th>
    			</tr>
    		</xsl:if>
    		<tr>
    			<xsl:choose>
    				<xsl:when test="GeometryPoint/@name = '.1'">
    					<td>.1</td>
    				</xsl:when>
    				<xsl:when test="GeometryPoint/@name = '.0'">
    					<td>.0</td>
    				</xsl:when>
    				<xsl:when test="GeometryPoint/@name = '.2'">
    					<td>.2</td>
    				</xsl:when>
    				<xsl:when test="GeometryPoint/@name = '.3'">
    					<td>.3</td>
    				</xsl:when>
    				<xsl:when test="GeometryPoint/@name = '53'">
    					<td>Shunt Point</td>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:value-of select="GeometryPoint/@name"/>
    				</xsl:otherwise>
    			</xsl:choose>
    			<td align="left">
    				<xsl:value-of select="@mainlineAlignment"/>
    			</td>
    			<td align="left">
    				<xsl:value-of select="GeometryPoint/@style"/>
    			</td>
    			<td align="right" nowrap="nowrap">
    				<xsl:value-of select="inr:stationFormat(number(GeometryPoint/station/@externalStation), $xslStationFormat,$xslStationPrecision, string(GeometryPoint/station/@externalStationName))"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:distanceFormat(number(GeometryPoint/@offset), $xslDistancePrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:northingFormat(number(GeometryPoint/@northing), $xslNorthingPrecision)"/>
    			</td>
    			<td align="right">
    				<xsl:value-of select="inr:eastingFormat(number(GeometryPoint/@easting), $xslEastingPrecision)"/>
    			</td>
    		</tr>
    	</xsl:template>
    	<xsl:template name="StyleSheetHelp">
    		<div class="section1">
    			<h4 lang="en">Notes</h4>
    			<p class="normal1" lang="en">
                    Your active geometry project must have at least one turnout definition.
                </p>
    			<p class="normal1">
                    You must select at least one turnout in the <em>Geometry &gt; Turnouts &gt; Reports</em> 
                    command.
                </p>
    			<h4 lang="en">Tips</h4>
    			<p class="normal1" lang="en">
                    To access the <em>Turnouts</em> commands, select the <em>Tools &gt; Application 
                    Add-Ins</em> command and toggle on the <em>Turnouts Add-In</em>.
                </p>
    			<p class="small" lang="en">
    				<em>&#xa9; 2006 Bentley Systems, Inc</em>
    			</p>
    		</div>
    	</xsl:template>
    </xsl:stylesheet>
    

    In the attached look for the following:

    <xsl:when test="GeometryPoint/@name = '53'">

    <td>Shunt Point</td>

    </xsl:when>

    Change the wording SHUNT POINT to whatever you want.  Remove the .txt from the file name and place it in the appropriate report folder.

    Regards,

    R. W. Bradshaw

    Answer Verified By: EBlach