<!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>Example of Adding a New Class</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">Example of Adding a New Class</div>
      <hr noshade="true">
      <p class="para_topic">It is perhaps easiest to understand the steps to be taken to create classes and subclasses in the Library using an example:</p>
      <div class="title_division">Enhance the existing library classification to also include ball end drills and chamfer milling tools.</div>
      <ul>
         <li>
            <p class="para_item"> <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_determ_class_needs.html');return(false);">Determine your classification needs</a> Since the Library class hierarchy contains only three types (classes), we have a choice of milling, drilling or turning. For our example, the decision is simple:
            </p>
            <p class="para_item">ball end drills &rarr; drilling (T = 03)</p>
            <p class="para_item">chamfer milling tools &rarr; milling (T=02)</p>
         </li>
         <li>
            <p class="para_item">&nbsp; <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_map_new_classes.html');return(false);">Map New Classes to Existing Ones</a></p>
            <p class="para_item">We must next decide if there is a suitable subtype. After checking the existing types and subtypes in the Library (see the  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_map_new_classes.html');return(false);">mapping table</a>), we see there are no existing subtypes to support these tools so we must create these subtypes. We will choose library subtypes 300 and 200 which do not yet exist. Furthermore, we have to determine to which NX internal types/subtypes our new tools will be mapped. We will map the ball end drill to the NX standard drill and the chamfer mill to the NX 7 parameter milling tool.
            </p>
            <table bgcolor="#f7f7f7" cellspacing="3" align="center">
               <tr bgcolor="c0c0c0" valign="middle">
                  <th colspan="8" rowspan="1" valign="top">
                     <p class="para_th">NX Library to &nbsp;CAM Mapping Table</p>
                  </th>
               </tr>
               <tr bgcolor="c0c0c0" valign="middle">
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">Library Type</p>
                  </th>
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">Attribute T</p>
                  </th>
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">Library Subtype</p>
                  </th>
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">Attribute ST</p>
                  </th>
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">CAM Type </p>
                  </th>
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">Attribute UGT</p>
                  </th>
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">CAM Subtype</p>
                  </th>
                  <th colspan="1" rowspan="1" valign="top">
                     <p class="para_th">Attribute UGST</p>
                  </th>
               </tr>
               <tr valign="middle">
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">DRILLING</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">03</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">BALL_END_DRILL</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">300</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">Drill</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">2</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">None</p>
                  </td>
                  <td colspan="1" rowspan="1">
                     <p class="para_td">1</p>
                  </td>
               </tr>
               <tr valign="middle">
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">MILLING</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">02</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">CHAMFER_MILL</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">200</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">Mill</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">1</p>
                  </td>
                  <td colspan="1" rowspan="1" valign="top">
                     <p class="para_td">&nbsp;7 Para. Mill</p>
                  </td>
                  <td colspan="1" rowspan="1">
                     <p class="para_td">2</p>
                  </td>
               </tr>
            </table><br></li>
         <li>
            <p class="para_item"> <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_add_class_to_dat.html');return(false);">Add New Classes to the Data File</a></p>
            <p class="para_item">In our example we are mapping the ball end drill to an NX drill and thus we have to look at the FORMAT record of  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_drill.html');return(false);">Drilling/UG_Drill</a> ( 03/90 ).
            </p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">This leads us to the following minimum set of DB_IDs for the new kind of drill:</p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">LIBRF - Tool Library Reference</p>
            <p class="para_item">T - Tool Type</p>
            <p class="para_item">ST - Tool SubType</p>
            <p class="para_item">UGT - NX Type</p>
            <p class="para_item">UGST - NX Subtype</p>
            <p class="para_item">DESCR - Description</p>
            <p class="para_item">MATREF - Tool Material Code</p>
            <p class="para_item">MATDES - Tool Material Description</p>
            <p class="para_item">DIA - Tool Diameter</p>
            <p class="para_item">FN - Tool Flutes Number</p>
            <p class="para_item">HEI - Tool Length (Height)</p>
            <p class="para_item">ZOFF - Tool Z Offset</p>
            <p class="para_item">DROT - Tool Direction (3=clockwise, 4=counterclockwise)</p>
            <p class="para_item">FLEN - Tool Flute Length (Cutting Depth)</p>
            <p class="para_item">PNTA - Tool Point Angle</p>
            <p class="para_item">COR1 - Tool Corner1 Radius</p>
            <p class="para_item">HDIA - Tool Holder Diameter</p>
            <p class="para_item">HLEN - Tool Holder Length</p>
            <p class="para_item">HTAP - Tool Holder Taper</p>
            <p class="para_item">HOFF - Tool Holder Offset</p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">and the FORMAT line in the .dat file appears as follows:</p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">FORMAT LIBRF T ST UGT UGST DESCR MATREF MATDES DIA FN HEI ZOFF DROT FLEN PNTA COR1 HDIA HLEN HTAP HOFF</p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">The chamfer mill is mapped to  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_mill_7.html');return(false);"> NX 7 Parameter Mill</a> which leads us to the following minimum set of DB_IDs for the new kind of milling tool:
            </p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">LIBRF - Tool Library Reference</p>
            <p class="para_item">T - Tool Type</p>
            <p class="para_item">ST - Tool SubType</p>
            <p class="para_item">UGT - NX Type</p>
            <p class="para_item">UGST - NX Subtype</p>
            <p class="para_item">DESCR - Description</p>
            <p class="para_item">MATREF - Tool Material Code</p>
            <p class="para_item">MATDES - Tool Material Description</p>
            <p class="para_item">HLD - Tool Holding System</p>
            <p class="para_item">HLDDES - Tool Holding System Description</p>
            <p class="para_item">DIA - Tool Diameter</p>
            <p class="para_item">FN - Tool Flutes Number</p>
            <p class="para_item">HEI - Tool Length (Height)</p>
            <p class="para_item">ZOFF - Tool Z Offset</p>
            <p class="para_item">DROT - Tool Direction (3=clockwise, 4=counterclockwise)</p>
            <p class="para_item">FLEN - Tool Flute Length (Cutting Depth)</p>
            <p class="para_item">TAPA - Tool Taper Angle</p>
            <p class="para_item">TIPA - Tool Tip Angle</p>
            <p class="para_item">COR1 - Tool Corner1 Radius</p>
            <p class="para_item">CX1 - Tool Corner1 Center X</p>
            <p class="para_item">CY1 - Tool Corner1 Center Y</p>
            <p class="para_item">HDIA - Tool Holder Diameter</p>
            <p class="para_item">HLEN - Tool Holder Length</p>
            <p class="para_item">HTAP - Tool Holder Taper</p>
            <p class="para_item">HOFF - Tool Holder Offset</p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">and the FORMAT line in the .dat file appears as follows:</p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">FORMAT LIBRF T ST UGT UGST DESCR MATREF MATDES HLD HLDDES DIA FN HEI ZOFF DROT FLEN TAPA TIPA COR1 CX1 CY1 HDIA HLEN HTAP HOFF</p>
            <p class="para_item">&nbsp;</p>
            <p class="para_item">You can add further (user defined) DB_IDs if you like. For example if the tools are assigned to a specific site in the company you can manage this by adding an attribute such as DB_ID SITE.</p>
         </li>
         <li>
            <p class="para_item"> <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_add_class_to_diags.html');return(false);">Add New Class/Subclass to Dialogs</a></p>
            <p class="para_item">We must edit the DBC definition file for the Library. </p>
            <ol type="1" start="1">
               <li>
                  <p class="para_item">Decide which attributes will be included as search criteria in the dialogs. For the ball end drill we would like to search for the tool diameter, flute length, and direction and corner radius. For the chamfer mill, we would like to search for the tool diameter, flute length and direction and tool point angle. In the list of DB_ALIAS we must add the corresponding DB_ALIAS if it is not already available. &nbsp;</p>
               </li>
               <li>
                  <p class="para_item"> <a class="links" href="javascript:void(0)" onclick="top.openFile('mfggeneral/com_lib_db_alias_class_hier.html');return(false);">Add the new classes to the class hierarchy</a>. The items for which you would like to search appear in the DIALOG and RSET lines of these entries. For the ball end drill the entry is contained within the drilling class (T=03) to make it a subclass and appears as follows: CLASS BALL_END_DRILL
                  </p>
               </li>
            </ol>
         </li>
      </ul>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TYPE QRY</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QUERY &nbsp;&quot;[DB(SubType)] == [300]&quot;</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FILE &quot;qry=ball_end_drill.gif;rset=shank_mill_schema;&quot; </p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DIALOG libref Diameter FluteDirection FluteLength CorRadMill Material Holder</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RSET &nbsp;&nbsp;libref Descr Diameter FluteLength CorRadMill MaterialDes HolderDes</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UI_NAME &quot;Ball End Drill&quot;</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
      <p class="para_division">For the chamfer mill, the entry is contained within the milling class (T=01) to make it a subclass and appears as follows: CLASS CHAMFER_MILL</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TYPE QRY</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QUERY &nbsp;&quot;[DB(SubType)] == [200]&quot;</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FILE &quot;qry=/path name/ball_end_drill.bmp;rset=/path name/ball_end_drill.bmp;&quot; </p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DIALOG libref Diameter FluteDirection FluteLength PointAngle Material Holder</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RSET &nbsp;&nbsp;libref Descr Diameter FluteLength PointAngle MaterialDes HolderDes</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UI_NAME &quot;Chamfer Mill&quot;</p>
      <p class="para_division">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
      <p class="para_division">The attributes in the DIALOG line will appear in the Search Criteria Dialog. </p>
      <p class="para_division">The attributes in the RSET line will appear in the Search Result Dialog.</p>
   </body>
</html>