<!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>Creating a Template</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_topic2" id="xps10_pagetitle">Creating a Template</div>
      <hr noshade="true">
      <p class="para_topic">As mentioned earlier, a template is a predefined operation or group within a CAM part file. A lead user or system administrator should manage the Template Part Files for the rest of the user group. Template Part Files may be created new or by copying, customizing, and renaming existing NX supplied templates. Template Part Files may contain many operations and many groups. You can specify which operations and groups are to be used as templates by choosing the Template Setting option in the Operation Navigator. </p>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body">Operations and geometry groups used in templates should not have any geometry selected. To avoid possible errors and increase performance, remove all geometry from template parts that you use on a regular bases. The exception is part families because much of the geometry selected in the master will be retained in the family members. </p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_topic">To make an operation or group a template:</p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">Open the template part file.</p>
         </li>
         <li>
            <p class="para_item">Highlight the desired operation(s) in the Operation Navigator </p>
         </li>
         <li>
            <p class="para_item">With MB3, choose <b class="uiTerm">Object</b> &rarr;<b class="uiTerm">Template Setting</b>.
            </p>
         </li>
         <li>
            <p class="para_item">Select <b class="uiTerm">Template</b> to make the highlighted operation(s) or group subtype templates. Subtype operations are shown as <b class="uiTerm">Subtype</b> options in the <b class="uiTerm">Create Operation</b> dialog.
            </p>
         </li>
         <li>
            <p class="para_item">Select <b class="uiTerm">Load with Parent</b> to:
            </p>
            <ul>
               <li>
                  <p class="para_item">Create the highlighted operation whenever its geometry parent is used as a template.</p>
               </li>
               <li>
                  <p class="para_item">Create the highlighted group whenever its parent is used as a template.</p>
                  <p class="para_item">For example, any time you create an MCS geometry group, a WORKPIECE geometry group is created within it.</p>
               </li>
            </ul>
            <p class="para_item"> This allows you to make a single template that creates a hierarchy of several objects, and that maintains each operation's parents in the work part.</p>
         </li>
      </ol>
      <p class="para_topic">The parent group structure affects how the operation is placed in the Operation Navigator hierarchy:</p>
      <ul>
         <li>
            <p class="para_item">If the parents already exist, the operation is placed in those parent groups.</p>
         </li>
         <li>
            <p class="para_item">If the parents do not exist, the new parent groups are created from the template part.</p>
            <table border="0">
               <tr>
                  <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
                  <td valign="bottom" align="left" width="100%">
                     <div class="para_note">
                        <p class="para_note_body">The software creates any missing parents in the same order as the operations. This means that the order of the program, method, and tool groups created in your work part may not match that of the original template part. If the order of these groups is critical, then create the groups first. </p>
                        <p class="para_note_body">If all programs in a template part are loaded with the parent, you can use the top level program as a template, and all the programs will be created in the correct order. This will place all <b class="uiTerm">Load with parent</b> operations in the existing program groups.
                        </p>
                     </div>
                  </td>
               </tr>
            </table>
         </li>
         <li>
            <p class="para_item"> If the operation has an <b class="uiTerm">Unused Items</b> parent in the template part, then the user sets the parent from the <b class="uiTerm">Create Operation</b> dialog in the work part.
            </p>
         </li>
      </ul>
      <p class="para_topic">The following figure shows how to make the ROUGH_WALLS and VARIABLE_CONTOUR operations into templates. After specifying the groups and operations to use as templates, save the part file in the appropriate directory with your other template files. In this example, the part file was saved as &quot;template3&quot;.</p>
      <p align="center"><img align="bottom" src="graphics/cust_opsfi05.gif"></p>
      <p class="para_topic">To use Template3 to create new operations:</p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">Open your part file.</p>
         </li>
         <li>
            <p class="para_item">Specify template3 as the <b class="uiTerm">Type</b>.
            </p>
            <table border="0">
               <tr>
                  <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
                  <td valign="bottom" align="left" width="100%">
                     <div class="para_note">
                        <p class="para_note_body">You may need to browse to the appropriate directory.</p>
                     </div>
                  </td>
               </tr>
            </table>
         </li>
      </ol>
      <p class="para_topic">The two operations you specified as templates, ROUGH_WALLS and VARIABLE_CONTOUR, then appear as icons in the subtype section of the dialog box. Operations may use the default icons as illustrated below.</p>
      <p align="center"><img align="bottom" src="graphics/cust_ops1fi02.gif"></p>
      <p class="para_topic">Optionally, you can add attributes to the object in the template part to define the icon and tool tip that appear in the <b class="uiTerm">Create Operation</b> dialog. To customize the icon or tool tip:
      </p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">Select the operation in the Operation Navigator.</p>
         </li>
         <li>
            <p class="para_item">Right&ndash;click and choose <b class="uiTerm">Properties</b>.
            </p>
         </li>
         <li>
            <p class="para_item">Define the attributes as shown below in the <b class="uiTerm">No Name Defined Properties</b> dialog box.
            </p>
         </li>
      </ol>
      <table border="1" cellpadding="2" cellspacing="1" align="center">
         <colgroup span="1">
            <col span="1">
            <col span="2">
            <col span="1">
         </colgroup>
         <tbody>
            <tr>
               <td colspan="1" rowspan="1">
                  <p class="para_td">Title</p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td">Type</p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td">Value</p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td">Description</p>
               </td>
            </tr>
            <tr>
               <td colspan="1" rowspan="1">
                  <p class="para_td">CAM_ICON</p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td"><b class="uiTerm">String</b></p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td">icon bitmap file name</p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td">Specifies the icon to display for this object type in the <b class="uiTerm">Create Operation</b> dialog box. It must either be an icon in the file system or an icon available in the NX bitmap directory.
                  </p>
               </td>
            </tr>
            <tr>
               <td colspan="1" rowspan="1">
                  <p class="para_td">CAM_TOOLTIP</p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td"><b class="uiTerm">String</b></p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td">the tool tip text to display</p>
               </td>
               <td colspan="1" rowspan="1">
                  <p class="para_td">Specifies the tool tip to display for this object type in the <b class="uiTerm">Create Operation</b> dialog box.
                  </p>
               </td>
            </tr>
         </tbody>
      </table><br><p class="para_topic">The software checks for a custom icon as follows:</p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">If CAM_ICON contains a full path specification, checks for the icon at that location.</p>
         </li>
         <li>
            <p class="para_item">If CAM_ICON contains just the icon name, checks for the icon in the system, and then in the search path specified by $UGII_BITMAP_PATH.</p>
         </li>
         <li>
            <p class="para_item">If CAM_ICON is not specified, searches for an icon with the same name as the object in the search path specified by $UGII_BITMAP_PATH.  To use this option, name your bitmaps exactly the same as your templates. For example: MY_CAVITY_MILL.bmp.</p>
         </li>
         <li>
            <p class="para_item">If the icon is not found at the search path specified by $UGII_BITMAP_PATH, uses the icon for this object type </p>
         </li>
      </ol>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body">For CAM templates, the icons should be 24x24 .bmp files.</p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_topic">Refer to the Customizing NX documentation for more details on customizing dialogs.</p>
      <div class="title_division">Load with Parent</div>
      <p class="para_division">In the following figure, WORKPIECE is highlighted. Template is toggled ON, which will cause WORKPIECE to be placed in the Create geometry dialog as a subtype icon. Load with Parent is also toggled ON, which will cause WORKPIECE to be created as a group every time its parent, MILL_ORIENT, is created as a group. Remember, in order for the MCS icon to appear in the Create Geometry dialog box, MCS must also be highlighted in the Operation Navigator and Template toggled ON.</p>
      <p align="center"><img align="bottom" src="graphics/cust_opsfi03.gif"></p>
      <p class="para_division"></p>
      <p class="para_division">Whenever MCS is created as a group by selecting the subtype icon and Create, WORKPIECE is also created as illustrated below. Think of the Load with Parent option as meaning; &quot;whenever you create my parent group, the system automatically creates me too!&quot;.</p>
      <p align="center"><img align="bottom" src="graphics/cust_opsfi02.gif"></p>
      <p class="para_division"><b class="uiTerm">Load with Parent</b> is sometimes used to load a predefined sequence of operations. Although the specified operations may actually have four parents (a Program parent, a Tool parent, a Geometry Parent, and a Method parent), operations are only loaded when creating Geometry groups. This applies, for example, even if you specify <b class="uiTerm">Load with Parent</b> in the Machine Tool View. The parent tool will not load the operations. The parent geometry, however, will load the operations.
      </p>
      <p class="para_division">The <b class="uiTerm">Load with Parent</b> option also allows you to determine which groups and operations in a Template Part File appear automatically in the Operation Navigator.
      </p>
      <p class="para_division">Specify <b class="uiTerm">Load with Parent</b> for a continuous sequence of groups and operations, beginning at the root. All of the template groups and operations are created automatically, and appear in the Operation Navigator, when you select the template part as a <b class="uiTerm">Setup</b> in the <b class="uiTerm">Machining Environment</b> dialog box.
      </p>
      <p class="para_division">In the following figure, <b class="uiTerm">Load with Parent</b> has been specified for MCS, WORKPIECE, ROUGH_FOLLOW, and FACE_MILLING. Because these groups and operations are in a contiguous, unbroken sequence, and because the selected sequence begins at the root (GEOMETRY), the groups and operations will be created automatically in the Operation Navigator when you initially specify the template part file as the <b class="uiTerm">Setup</b>.
      </p>
      <p align="center"><img align="bottom" src="graphics/cust_opsfi01.gif"></p>
   </body>
</html>