<!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>Working with entity filters</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">Working with entity filters</div>
      <hr noshade="true">
      <p class="para_topic">PCB.xchange Entity Filters allow you to control which entities are translated to the new file when importing or exporting an ECAD file and which are not. Filters can also be used when writing to NX or to ECAD. Components, restriction areas and drilled holes can be filtered out or written depending on specified criteria. These settings are not accessible through the GUI so you must define filters by modifying an ASCII text file called <code>pcbx_ug_filter.ini</code>. Once defined, the list of defined filters appears in a menu in the dialog box whenever you import, export or write a file. When you use the <b class="uiTerm">Write ECAD Model</b> or  <b class="uiTerm">Write NX Model</b> commands in the PCB.xchange window, you can view the results of a filtering operation before writing the file by clicking <b class="uiTerm">Preview</b>. PCB.xchange applies the filter to the display. Press  <em>Esc</em> key to return to the dialog box. 
      </p>
      <p class="para_topic">The filter file is typically applicable for the whole site and should be installed as a default in the <i class="pathName">%MAYA_PCB_DIR%</i> directory (<i class="pathName">$MAYA_PCB_DIR</i> on UNIX). However, individual users may want to create new filters for their own use. To create your own  <i class="fileName">pcbx_ug_filter.ini</i>, copy the default filter from the <i class="pathName">MAYA_PCB_DIR</i> directory. Then edit it with any text editor and save it in your home directory or in the working directory where you start PCB.xchange.
      </p>
      <p class="para_topic">When importing, exporting or writing files, the you can select which filters to apply in the dialog box that appears. Typically the filter file is set up by a CAD system administrator for a site installation. Multiple filter definitions (name) can be defined in the file; this allows you to select the most appropriate filter for the use, or any combination of filters. Each filter definition starts with [Filter Name]. The filter key words below describe how the filter works. One or all of the filter keywords can be used to build the filter definition. If the keyword is not present then its default value is used.</p>
      <div class="title_division">Operation of the pcbx_ug_filter.ini file</div>
      <p class="para_division">At start up, PCB.xchange looks for the file <code>pcbx_ug_filter.ini</code> in a sequence of directories. First, PCB.xchange looks for the file in the directory from which it was launched. If it does not find it there, it looks for it in the user's home directory. If the file does not exist in this directory either, PCB.xchange uses the installed file stored in the <i class="pathName">MAYA_PCB_DIR</i> directory.
      </p>
      <p class="para_division">The file <i class="fileName">pcbx_filter.ini</i> is used to initialize the PCB.xchange entity filter settings. The file is read when PCB.xchange starts and is never written by PCB.xchange. 
      </p>
      <p class="para_division">Note: The filter file is read for filter names only at start-up. The actual filter attributes are read during file creation and Preview operations. This allows you to edit the filter file and observe changes to how the filters behave without closing and restarting PCB.xchange.</p>
      <p class="para_division">If the variable is not set in the filter file, default values are applied as indicated below.</p>
      <div class="title_division"> Variables</div>
      <div class="title_division"> [Filter Name]</div>
      <p class="para_division">Default = [blank]</p>
      <p class="para_division">Specifies the start of a new filter definition group. The variables that follow this line and precede the next filter name define the filter's behavior. Name is limited to 40 characters.</p>
      <div class="title_division"> ComponentTypes</div>
      <p class="para_division">Default = ALL</p>
      <p class="para_division">Specifies which component types are to be included or excluded in the created file. Defined as a comma delimited list. A plus sign (+) in front of the component type indicates it is to be included. A minus sign (-) indicates it is to be excluded. If there is no indication, plus (+) is assumed. ALL and NONE do not support the +/- modifiers.</p>
      <p class="para_division">Allowable types are: ALL, NONE, ECAD, MCAD, PLACED, UNPLACED</p>
      <p class="para_division">(Note that in IDF standard, the component types ECAD, MCAD, PLACED and UNPLACED are mutually exclusive.)</p>
      <p class="para_division">Examples:</p>
      <table border="3" cellpadding="5" align="center">
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td"><em>Filter</em></p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td"><em>Syntax</em></p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">Alternate Syntax</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">All components except UNPLACED</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">ComponentTypes=ALL, -UNPLACED</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">ComponentTypes=ECAD, MCAD, PLACED</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Only ECAD components:</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">ComponentTypes=NONE, +ECAD</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">ComponentTypes=ECAD</p>
            </td>
         </tr>
      </table><br><div class="title_division"> ComponentMinSize</div>
      <p class="para_division">Default = 0</p>
      <p class="para_division">The minimum allowable component size. Components with both X and Y foot print dimension smaller than this size are discarded. A value of 0 means no minimum value is set in the filter.</p>
      <p class="para_division">Units: meter</p>
      <div class="title_division"> ComponentMaxSize</div>
      <p class="para_division">Default = 99</p>
      <p class="para_division">The maximum allowable component size (X or Y foot print dimension). Components with both X and Y foot print dimension larger than this size are discarded. A value greater than one (&gt;1) means no maximum value is set in the filter.</p>
      <p class="para_division">Units: meter</p>
      <div class="title_division"> ComponentMinHeight</div>
      <p class="para_division">Default = 0</p>
      <p class="para_division">The minimum allowable component height. Components below this height are discarded. A value of zero (0) means no minimum value is set in the filter.</p>
      <p class="para_division">Units: meter</p>
      <div class="title_division"> ComponentMaxHeight</div>
      <p class="para_division">Default = 99</p>
      <p class="para_division">The maximum allowable component height. Components above this height are discarded. A value greater than one (&gt;1) means no maximum value is set in the filter.</p>
      <p class="para_division">Units: meter</p>
      <div class="title_division"> ComponentRemoveDesignators</div>
      <p class="para_division">Default = None</p>
      <p class="para_division">Specifies list of ASCII text strings to match to reference designator labels and discard components whose designators match these strings. The string can contain any alphanumeric character. The asterisk wildcard (*) is also supported. The data is tabular so multiple entries are listed on individual lines and added to the table. Some characters other than alphanumeric may cause problems with other applications.</p>
      <p class="para_division">Example:</p>
      <table border="3" cellpadding="5" align="center">
         <colgroup span="1">
            <col span="1" width="45*">
            <col span="1" width="154*">
         </colgroup>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Filter</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td"><em>Syntax</em></p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Discard all components where the reference designators begin with R or C and contain J</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">ComponentRemoveDesignators=R* ComponentRemoveDesignators=C* ComponentRemoveDesignators=*J*</p>
            </td>
         </tr>
      </table><br><div class="title_division"> ComponentRemoveNames</div>
      <p class="para_division">Default = None</p>
      <p class="para_division">A list of strings to match to component (geometry) name labels and discard components whose names match these strings. The string can contain any alphanumeric character. The ALL wildcard or &quot;*&quot; is also supported. The data is tabular so multiple entries are listed on individual lines and added to the table. Characters other than alphanumeric (ex: *&amp;$#@, etc) are not supported.</p>
      <p class="para_division">Example:</p>
      <table border="3" cellpadding="5" align="center">
         <colgroup span="1">
            <col span="1" width="45*">
            <col span="1" width="154*">
         </colgroup>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Filter</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td"><em>Syntax</em></p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Discard all components where the name begins with DIP or PLCC</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">ComponentRemoveNames=DIP* ComponentRemoveNames=PLCC*</p>
            </td>
         </tr>
      </table><br><div class="title_division"> ComponentRemoveNumbers</div>
      <p class="para_division">Default = None</p>
      <p class="para_division">A list of strings to match to reference number labels and discard components whose numbers match these strings. The string can contain any alphanumeric character. The ALL wildcard or &quot;*&quot; is also supported. The data is tabular so multiple entries are listed on individual lines and added to the table. Characters other than alphanumeric (ex: *&amp;$#@, etc) are not supported.</p>
      <p class="para_division">Example:</p>
      <table border="3" cellpadding="5" align="center">
         <colgroup span="1">
            <col span="1" width="41*">
            <col span="1" width="158*">
         </colgroup>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Filter</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">Syntax</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Discard all components where the number begins with BHR or contains RES</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">ComponentRemoveNumbers=BHR** ComponentRemoveNumbers=*RES*</p>
            </td>
         </tr>
      </table><br><div class="title_division"> KeepinTypes</div>
      <p class="para_division">Default = ALL</p>
      <p class="para_division">Defined as a comma delimited list specifying which keep-in area types are to be included or excluded in the created file. A plus sign (+) in front of the keep-in type indicates it is to be included. A minus sign (-) indicates it is to be excluded. If there is no indication, plus (+) is assumed. ALL and NONE keep-in types do not support the +/- modifiers.</p>
      <p class="para_division">Allowable types are: ALL, NONE, ROUTING, PLACEMENT, PLACEGROUP, OTHER</p>
      <p class="para_division">Examples:</p>
      <table border="3" cellpadding="5" align="center">
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td"><em>Filter</em></p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td"><em>Syntax</em></p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">Alternate Syntax</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">All keep-ins except OTHER</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">KeepinTypes=ALL, -OTHER</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">KeepinTypes=ROUTING, PLACEMENT, PLACEGROUP</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1">
               <p class="para_td">Only ROUTING keep-ins</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">KeepinTypes=NONE, +ROUTING</p>
            </td>
            <td colspan="1" rowspan="1">
               <p class="para_td">KeepinTypes=ROUTING</p>
            </td>
         </tr>
      </table><br><div class="title_division"> KeepoutTypes</div>
      <p class="para_division">Default = ALL</p>
      <p class="para_division">Defined as a comma delimited list specifying which keep-out area types are to be included or excluded in the created file. A plus sign (+) in front of the keep-out type indicates it is to be included. A minus sign (-) indicates it is to be excluded. If there is no indication, plus (+) is assumed. ALL and NONE keep-out types do not support the +/- modifiers.</p>
      <p class="para_division">Allowable types are: ALL, NONE, ROUTING, PLACEMENT, VIA</p>
      <div class="title_division"> DrilledHoleTypes</div>
      <p class="para_division">Default = ALL</p>
      <p class="para_division">Specifies which drilled hole types are to be included or excluded in the created file. Defined as a comma delimited list. A plus sign (+) in front of the drilled hole type indicates it is to be included. A minus sign (-) indicates it is to be excluded. If there is no indication, plus (+) is assumed. ALL and NONE do not support the +/- modifiers.</p>
      <p class="para_division">Allowable types are: ALL, NONE, PIN, VIA, MOUNTING, TOOL, OTHER</p>
      <div class="title_division"> DrilledHoleMinDiam</div>
      <p class="para_division">Default = 0</p>
      <p class="para_division">Specifies a minimum allowable diameter for drilled holes included in the created file. Holes with a smaller diameter are discarded. A value of zero (0) means no minimum value is set in the filter.</p>
      <p class="para_division">Units: meter</p>
      <div class="title_division"> DrilledHoleMaxDiam</div>
      <p class="para_division">Default = 99</p>
      <p class="para_division">Specifies a maximum allowable diameter for drilled holes included in the write operation. Holes with a larger diameter are discarded. A value greater than one (&gt;1) means no maximum value is set in the filter.</p>
      <p class="para_division">Units: meter</p>
      <div class="title_division"> NxWriteCombineHoleTypes</div>
      <p class="para_division">Default = NONE</p>
      <p class="para_division">Specifies that all drilled holes of matching characteristics are grouped as a single feature in the NX PC Board assembly. A plus sign (+) in front of the drilled hole type indicates it is to be grouped. A minus sign (-) indicates it is NOT to be grouped. If there is no indication, plus (+) is assumed. ALL and NONE do not support the +/- modifiers. </p>
      <p class="para_division">Add the following filter syntax to control how holes are combined.</p><pre class="indent">NxWriteCombineHoleTypes = [series of filter options]</pre><ul>
         <li>
            <p class="para_item">ALL combines all holes with identical characteristics </p>
         </li>
         <li>
            <p class="para_item">NONE creates each hole as a separate feature </p>
         </li>
         <li>
            <p class="para_item">+/-PIN creates Pin type holes as a grouped feature (+) or as individual features (-) </p>
         </li>
         <li>
            <p class="para_item">+/-VIA creates Via type holes as a grouped feature (+) or as individual features (-) </p>
         </li>
         <li>
            <p class="para_item">+/-MOUNTING creates Mounting type holes as a grouped feature (+) or as individual features (-) </p>
         </li>
         <li>
            <p class="para_item">+/-TOOL creates Tool type holes as a grouped feature (+) or as individual features (-) </p>
         </li>
         <li>
            <p class="para_item">+/-OTHER creates Other type holes as a grouped feature (+) or as individual features (-) </p>
         </li>
      </ul>
      <div class="title_division"> CircCutoutsAsHoles</div>
      <p class="para_division">Default = NO</p>
      <p class="para_division">Specifies if circular cut-outs should automatically be converted to drilled holes when transferring a board part from NX to PCB.xchange. If YES, then circular cut-outs smaller than ReadCircCutoutsMaxDiam are converted to drilled holes with the attributes, ReadCircCutoutsType, ReadCircCutoutsPlating, ReadCircCutoutsOwner. </p>
      <p class="para_division">Since circular cut-outs are converted to drilled holes, if drilled hole filters are set then the converted circular cut-outs must pass the drilled hole filter to be exported.</p>
      <div class="title_division"> CircCutoutsMaxDiam</div>
      <p class="para_division">Default = 99 (meters)</p>
      <p class="para_division">Specifies the maximum diameter for circular cut-outs to be converted to drilled holes. Circular cut-outs smaller than this diameter are be converted to drilled holes. Values greater than one (&gt;1) are be interpreted as ALL circular cut-outs.</p>
      <div class="title_division"> CircCutoutsType</div>
      <p class="para_division">Default = OTHER</p>
      <p class="para_division">Specifies the Drilled Hole Type for circular cut-outs that have been automatically converted to drilled holes.</p>
      <p class="para_division">Only one of: PIN, VIA, MOUNTING, TOOL, OTHER</p>
      <div class="title_division"> CircCutoutsPlating</div>
      <p class="para_division">Default = NONPLATED</p>
      <p class="para_division">Specifies the default Plating Type for circular cut-outs that have been automatically converted to drilled holes.</p>
      <p class="para_division">Only one of: NONPLATED, PLATEDTHRU</p>
      <div class="title_division"> CircCutoutsOwner</div>
      <p class="para_division">Default = UNOWNED</p>
      <p class="para_division">Specifies the Owner attribute for circular cut-outs that have been automatically converted to drilled holes.</p>
      <p class="para_division">Only one of: ECAD, MCAD, UNOWNED</p>
      <div class="title_division"> ComponentMapFile</div>
      <p class="para_division">Default = [blank]</p>
      <p class="para_division">Specifies the name and location of a file to use for component mapping tables. Defined as an ASCII text string. String can contain environment variables prefixed with a dollar sign ($). Note that mapping is performed only on those components which pass all the above filters.</p>
      <p class="para_division">See Component Mapping for more information.</p>
   </body>
</html>