<!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>Attribute association</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_topic3" id="xps10_pagetitle">Attribute association</div>
      <hr noshade="true">
      <p class="para_topic"><b class="uiTerm">Attribute Association</b> provides the means to associate the hiding of a component or a segment to an attribute. To use <b class="uiTerm">Attribute Associations</b>, you create special attributes on any path segments or connectors. Whenever you apply a <b class="uiTerm">Variable Build Filter</b> to the connection list, Routing Electrical checks every segment and connector in the harness for the existence of the special attribute. If the special attribute exists for a segment or connector, a custom plug-in function invokes with a string taken from the filter definition passed into it. This plug-in function returns to Routing Electrical an indicator as to whether Routing Electrical should hide the given segment or connector. Routing Electrical then performs the hiding function on the segment or connector if indicated.
      </p>
      <div class="title_division">Concepts and definitions</div>
      <p class="para_division">An option content string, or <b class="uiTerm">Variable Build String</b>, is definable for any <b class="uiTerm">Connection Navigator</b> or <b class="uiTerm">Component Navigator</b> filter defined in a Routing Electrical filter file or configuration file. The format of a filter definition and its associated variable build string is:
      </p><pre class="indent">Connection Navigator Display Filter = {Filter Name}
{Filter definition}
Variable Build String
{Variable Build String}</pre><p class="para_division">The {<b class="uiTerm">Variable Build String</b>} can be one or more non-blank lines containing any printable ASCII characters and blanks. A line of all blanks, an empty line, or a line beginning with <em>!</em> (the <b class="uiTerm">Route List Comment Character</b>) terminates the definition of the string. Any leading or trailing blanks are not included in the string. If the definition spans multiple lines, the lines are concatenated to form a single variable build string. There is no limit to the length of the variable build string. The variable build string defined is associated with the display filer immediately preceding it (and no others).
      </p>
      <p class="para_division">If a given filter has a <b class="uiTerm">Variable Build String</b> associated with it, the user defined plug-in invokes when the filter is applied to the <b class="uiTerm">Connection Navigator</b> or <b class="uiTerm">Component Navigator</b>.
      </p>
      <p class="para_division">For each segment and component in the work part that has a <b class="uiTerm">Logical Attribute</b> (see below) assigned to it, Routing Electrical invokes the plug-in and passes the value of the tag of the object (for example, the tag of the segment in the work part or the tag of the occurrence of the component in the work part), the title of the <b class="uiTerm">Logical Attribute</b>, the value of the <b class="uiTerm">Logical Attribute</b>, and the value of the <b class="uiTerm">Variable Build String</b>. The plug&ndash;in returns a value indicating whether this object is to be hidden. Routing Electrical then performs the hiding.
      </p>
      <p class="para_division">The prototype of the plug-in function must have the prototype syntax of:&nbsp;</p><pre class="indent">&lt;function name&gt;( tag_t segment_or_connector_tag /* &lt;|&gt; */
char* logical_attribute_title /* &lt;|&gt; */
char* logical_attribute_value /* &lt;|&gt; */
char* variable_build_string /* &lt;|&gt; */
int blanked /* &lt;)&gt; */
):</pre><p class="para_division">The plug-in should output, in the empty variable, an integer value of 0 (zero) to indicate no action (return to state prior to any <b class="uiTerm">Logical Association</b> display) or a value of 1 (one) to indicate that the object is to be hidden.
      </p>
      <p class="para_division">The actual object that is hidden is the occurrence of the segment or component under the currently displayed part. Note that if the displayed part is different from the work part, it is the occurrence of the object in the displayed part that is hidden only. If the displayed part is subsequently changed to be the work part (or any other), the object will not (necessarily) be hidden. This is the standard behavior of hiding in NX.</p>
      <p class="para_division">You are responsible for assigning the logical attribute (and its value) to the segments and components. Routing Electrical provides an interface from the <b class="uiTerm">Connection and Component Navigator Properties</b> dialog box to select one or many objects to apply the <b class="uiTerm">Logical Attribute</b> defined in the <b class="uiTerm">Application View</b> file with a user specified value.
      </p>
      <p class="para_division">Only segments in the current work part are queried for the <b class="uiTerm">Logical Attribute</b>.
      </p>
      <p class="para_division">Only first level components (those directly under the current work part) are queried for the <b class="uiTerm">Logical Attribute</b>. The component occurrence in the work part is checked first. If the occurrence does not have the attribute, then the actual prototype part is queried for the special attribute. This allows the attribute to be assigned as a component attribute (residing in the work part) or as a part attribute (residing down in the component part).
      </p>
      <p class="para_division">The <b class="uiTerm">Auto Route</b> and <b class="uiTerm">Manual Route</b> functions will only allow routing only along segments that are shown in the displayed part. Similarly, Routing Electrical will not attempt to route a wire to a component that is currently hidden.
      </p>
      <p class="para_division">The plug-in library and entry point are defined through the normal plug-in mechanism for Routing, defined by an entry in the Application View file (.apv). The plug-in name is RLIST_FILTER_BLANKING. There is no default routine for this plug-in, so no routine invokes unless your site specifically defines the plug-in.</p>
      <p class="para_division">For example, the portion of the .apv file defining the plug-in could appear as:</p><pre class="indent">!-------------------------
! Plug-ins
!-------------------------
PLUGINS
!Name Library/Type Function/Entry
Point
RLIST_FILTER_BLANKING customer_blanking_routine do_filter_blanking
END_OF_PLUGINS</pre><p class="para_division">The name of the <b class="uiTerm">Logical Attribute</b>, assigned to the segments and components and used by the plug&ndash;in, is customizable and defined via an entry in the Application View file. The variable named RLIST_FILTER_BLANKING_ATTRIBUTE is defined in the <b class="uiTerm">Preferences</b> section with the type STRING. The value of this variable is the title of the <b class="uiTerm">Logical Attribute</b>.
      </p>
      <p class="para_division">For example, if the title of the special attribute is BLANKING_CODE, the entry in the .apv file could appear as:</p><pre class="indent">PREFERENCES
! The name of the attribute used for filter blanking
STRING RLIST_FILTER_BLANKING_ATTRIBUTE
BLANKING_CDE
END_OF_PREFERENCES</pre><p class="para_division">The value (BLANKING_CODE in this example) is the name of the attribute that Routing Electrical searches for on segments and connectors to determine if the segment or connector passes to the plug&ndash;in routine.</p>
      <p class="para_division">If the RLIST_FILTER_BLANKING plug&ndash;in is not defined, or RLIST_FILTER_BLANKING_ATTRIBUTE is not defined, or the <b class="uiTerm">Variable Build String</b> is not defined for the current filter, the plug&ndash;in is NOT invoked.
      </p>
      <p class="para_division">An example of an RLIST_FILTER_BLANKING plug&ndash;in is provided in the file ufd_route_blanking.c found in the ugopen directory. The default plug&ndash;in is built into libroute_plugins (also in the routing plug&ndash;ins directory) and has the entry point UF_do_filter_blanking.</p><a class="endOfDocLinks" href="logic_att_dialog.html">Logical Attribute dialog box</a><br></body>
</html>