<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Counter</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic4" id="xps10_pagetitle">Counter</div>
      <hr noshade="true">
      <p align="left"><img align="bottom" src="graphics/counter.gif"></p>
      <p class="para_topic"><b class="uiTerm">Counter</b> automatically assigns and manages unique numbers (counters) while placing components or creating runs. Once defined, counters can be redefined at any time and applied to already placed components. There is one dedicated counter for runs and any number of user-defined ones for components.
      </p>
      <p class="para_topic">Counters are defined by means of User_Preferences in the Routing Logical Application View file by specifying the following:</p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">Name of the counter (RUN for runs).</p>
         </li>
         <li>
            <p class="para_item">Its start and maximum value as well as the increment for new values in between.</p>
         </li>
         <li>
            <p class="para_item">Name of the component and / or run attribute that holds the name of the counter to be applied.</p>
         </li>
         <li>
            <p class="para_item">Name of the component and / or run attribute that is going to hold the assigned counter value.</p>
         </li>
      </ol>
      <p class="para_topic">When a component is placed or a run is created, the system tries to find an attribute (3) which denotes a number range. When such an attribute is found, it looks for the last generated number of that range (part attribute with the same name as (3)), increments that number, assigns it (4) to the component or run and stores the new value as a part attribute with the same name as (3).</p>
      <p class="para_topic">The <b class="uiTerm">Counter</b> feature can be accessed under <b class="uiTerm">Edit&rarr;Routing Logical</b>. The application view file for Routing Logical, <code>ugroute_lgl_mm.xml</code>, must have the following user preferences for this feature to work. Value(s) for the user preferences are given as an example.
      </p>
      <table cellpadding="2" cellspacing="4" width="95%" align="center">
         <colgroup span="1">
            <col span="1" width="120*">
            <col span="1" width="95*">
         </colgroup>
         <thead>
            <tr>
               <td align="center" bgcolor="silver" colspan="1" rowspan="1">
                  <p class="para_td">Name</p>
               </td>
               <td align="center" bgcolor="silver" colspan="1" rowspan="1">
                  <p class="para_td">Value(s)</p>
               </td>
            </tr>
         </thead>
         <tbody>
            <tr bgcolor="#f0f0f0">
               <td colspan="1" rowspan="1" valign="top">
                  <p class="para_td"><code>PIPING_COUNTER_DEFINITIONS</code></p>
               </td>
               <td colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Device = 1, 1000, 1</p>
                  <p class="para_td">Armature = 401,1000, 1</p>
                  <p class="para_td">Run = 201, 1000, 5</p>
               </td>
            </tr>
            <tr bgcolor="#f0f0f0">
               <td colspan="1" rowspan="1" valign="top">
                  <p class="para_td"><code>PIPING_COUNTER_RUN_ATTRIBUTE</code></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">RUN_ID</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F0F0F0" colspan="1" rowspan="1" valign="top">
                  <p class="para_td"><code>PIPING_COUNTER_COMP_ATTRIBUTE</code></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">REFERENCE_ID</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F0F0F0" colspan="1" rowspan="1" valign="top">
                  <p class="para_td"><code>PIPING_COUNTER_TYPE_ATTRIBUTE</code></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">PCTA</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F0F0F0" colspan="1" rowspan="1" valign="top">
                  <p class="para_td"><code>PIPING_COUNTER_UNIQUE_ATTRIBUTEs</code></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">COMMENT</p>
               </td>
            </tr>
         </tbody>
      </table><br><p class="para_topic"><code>PIPING_COUNTER_RUN_ATTRIBUTE</code> can be any attribute name, but by calling it RUN_ID, its value can be used as the default value when creating a new run.
      </p>
      <p class="para_topic"><code>PIPING_COUNTER_COMP_ATTRIBUTE</code> can be any attribute name, but by calling it REFERENCE_ID, its value can be used as the default value when creating a new run.
      </p>
      <p class="para_topic"><code>PIPING_COUNTER_UNIQUE_ATTRIBUTEs</code> is an optional attribute. This attribute can be used to refine the &ldquo;non-unique counter attribute&rdquo; rule (see Rules for more detail).
      </p>
   </body>
</html>