<!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>Saving and Updating Spreadsheets</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">Saving and Updating Spreadsheets</div>
      <hr noshade="true">
      <p class="para_topic">Selecting the spreadsheet menu option File&rarr;Save Workspace stores the spreadsheet data in the NX work part. After a spreadsheet has been saved, it will be reopened on subsequent sessions. You may also save the spreadsheet as a file and reload the file after the Modeling Spreadsheet is active.</p>
      <p class="para_topic">An additional control is provided that allows you to specify whether NX expressions are automatically extracted or updated after the spreadsheet has been loaded.</p>
      <div class="title_division">Saving the Spreadsheet</div>
      <p class="para_division">To save the spreadsheet:</p>
      <ul>
         <li>
            <p class="para_item">Select File&rarr;Save Copy As. The data is then saved in the working part.</p>
         </li>
      </ul>
      <p class="para_division">To save the working part:</p>
      <ul>
         <li>
            <p class="para_item">Select Tools&rarr;Save Workspace. </p>
         </li>
      </ul>
      <div class="title_division">Automatic Updates</div>
      <p class="para_division">A prerequisite for automatic extraction of updates is that the saved spreadsheet includes NX expression names and formulas in a column or row, and that the Active Range has been defined.</p>
      <p class="para_division">To enable automatic extraction of expressions:</p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">Select Options&rarr;UG Preferences.</p>
         </li>
         <li>
            <p class="para_item">In the NX Preferences dialog, check the box for Auto Refresh on Load and press OK.</p>
         </li>
         <li>
            <p class="para_item">Select Tools&rarr;Save Part.</p>
         </li>
      </ol>
      <div class="title_division">Variations on a Theme (a.k.a Family of Parts)</div>
      <p class="para_division">The term &quot;Family of Parts&quot; is used here to describe a group of parts that have slight variations; hence the term, Variations on a Theme.</p>
      <p class="para_division">To facilitate families (or variations), the Modeling Spreadsheet allows you to have multiple rows or columns of expressions/constants defined in the format of a standard family table.</p>
      <p class="para_division">After defining the family table in the spreadsheet, you may select members to be built and saved on an individual basis, or build the entire family (or variation set) with a single operation.</p>
      <div class="title_division">Defining the Family Table</div>
      <p class="para_division">The Modeling Spreadsheet recognizes two types of family tables: simple and extended. In both tables, the first row (or column) must contain the expression names. Each subsequent column or row corresponds to a family member. An example of a simple table is shown below. Extended Family Tables include an additional column (or row) appended to the simple table, whose cells contain the file name you want the member to be saved as.</p>
      <div class="figure">
         <p align="center"><img align="bottom" src="graphics/tls_6ssheetfr31.gif"></p>
      </div>
      <div class="title_figure">Simple Family Table</div>
      <p class="para_division">The figure above shows a simple family table with a row-wise organization. Once the table is defined, you can then define the Active Range according to the table type:</p>
      <table cellspacing="3" align="center">
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td">Simple</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td">Highlight the entire table and select either Edit&rarr;Define Expr Rng or Edit&rarr;Define Attr Rng.</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td">Extended</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td">Highlight the entire table excluding the row/column containing the file names, and select either Edit&rarr;Define Expr Rng or Edit&rarr;Define Attr Rng.</p>
               <p class="para_td">When the file names are not included in the Active Range while using an extended table, the table must be further identified by keyboard selection during the build operation.</p>
            </td>
         </tr>
      </table><br><p class="para_division">Or</p>
      <table cellspacing="3" align="center">
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td">Extended</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td">Highlight the table including the file names and select Edit&rarr;Define Expr Rng or Edit&rarr;Define Attr Rng.</p>
            </td>
         </tr>
      </table><br><p class="para_division"> Select File&rarr;Save Workspace to Save the Spreadsheet with the Defined Tables</p>
      <p class="para_division">The figure below shows an extended family table with row-wise organization.</p>
      <div class="figure">
         <p align="center"><img align="bottom" src="graphics/tls_6ssheet1fr29.gif"></p>
      </div>
      <div class="title_figure">Extended Family Table</div>
      <div class="title_division">Building an Individual Family Member</div>
      <p class="para_division">To build an individual family member in the spreadsheet, follow these steps:</p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">Display the model in NX as the active part and start the Modeling Spreadsheet.</p>
         </li>
         <li>
            <p class="para_item">Optional: If the family table was not automatically loaded, you must create the family table or load a spreadsheet that contains a pre-defined family table.</p>
         </li>
         <li>
            <p class="para_item">Ensure the Active Range is defined. In the Simple Family table the active range would be B1..D2.</p>
         </li>
         <li>
            <p class="para_item">Ensure that Options&rarr;UG Preferences&rarr;Use Fixed Update Range is OFF.</p>
         </li>
         <li>
            <p class="para_item">Select a part to build by clicking within the row or column containing the desired member values. For example, to build part 0500-114-19, click the cursor into A6, B6, C6, or D6.</p>
         </li>
         <li>
            <p class="para_item">Select Tools&rarr;Update NX Part.</p>
         </li>
         <li>
            <p class="para_item">Select Tools&rarr;Save Part As and specify a part name. Select OK.</p>
         </li>
      </ol>
      <div class="title_division">Building a Family / Family Subset Collectively</div>
      <p class="para_division">To build an entire family (or family subset) using the Modeling Spreadsheet:</p>
      <ol type="1" start="1">
         <li>
            <p class="para_item">Display the base model in NX as the active part, and start the Modeling Spreadsheet.</p>
         </li>
         <li>
            <p class="para_item">Ensure that the Active Range is properly defined.</p>
         </li>
         <li>
            <p class="para_item">Set the Family Range by highlighting the entire family table, or the desired subset, and choosing the Edit&rarr;Define Fmly Rng option.</p>
         </li>
         <li>
            <p class="para_item">Select Tools&rarr;Build Family.</p>
         </li>
      </ol>
      <p class="para_division">For example:</p>
      <p class="para_division">In the figure of the Extended Family Range, the Active Range is defined as B1..D2 and the Family Range is defined to be B1..E7. Then select Build Family.</p>
      <p class="para_division">The Modeling Spreadsheet will then create 6 parts using the file names in E2..E7, and the parameters as defined by the corresponding row.</p>
      <div class="title_division">Another Way to do Variations on a Theme</div>
      <p class="para_division">One of the powerful capabilities of the spreadsheet is its ability to do variations on a theme, where you can update from a table of possible parameter values. One way to build the variation table is shown on the preceding pages. This section presents a second method for constructing the parameter table.</p>
      <p class="para_division">The first thing we need to do using the approach described in this section is to create a table with entries for each of the parameter values with respect to each variation. Suppose we are building one of a set of four widgets (part numbers 34698-A through 34698-D), and we are concerned about their width, height, and thickness. Our table might look like the one shown below.</p>
      <div class="figure">
         <p align="center"><img align="bottom" src="graphics/tls_6ssheet1fr28.gif"></p>
      </div>
      <div class="title_figure">Parameter Table for Variations on a Theme</div>
      <p class="para_division">The first column in this table contains identifiers for the part variation, in this case just the `dash` numbers. The next columns contain parameter values for the width, height, and thickness, along with some auxiliary information.</p>
      <p class="para_division">After the table shown above is built, we need to include a section in the spreadsheet that is used to update the table parameters into NX, and some way to control which part variation will be used.</p>
      <div class="figure">
         <p align="center"><img align="bottom" src="graphics/tls_6ssheet1fr27.gif"></p>
      </div>
      <div class="title_figure">Update &amp; Control of Variations on a Theme</div>
      <p class="para_division">The light brown section of the spreadsheet (Cells A3..C8) is basically the traditional NX parameter update block. Cells A4..A8 contain parameter names from the NX part. Cells B4..B8 contain the expressions for those parameters. The range from A4..B8 should be set as the spreadsheet's Active Expression Range (Edit&rarr;Define Expr Rng). The cells C4..C8 are an optional column that just contain evaluated values for the expressions in B4..B8.</p>
      <p class="para_division">The section named &quot;Build Variation&quot;, and specifically cell C10, is used to control exactly which parameters from the variations table will be used during an update.</p>
      <p class="para_division">The mechanism that enables the build variation is the formula used in cells A4 to A6. Instead of &quot;hardwiring&quot; a value for the parameter, the cell contains a lookup table command that selects the proper parameter value from the Parametric Design Options table. For cell B4 the formula is:</p>
      <p class="para_division">=@VLOOKUP(C10,A16..D19,1)</p>
      <p class="para_division">VLOOKUP searches the first column (known as the index column) of the range A16..D19 (the variation table) for the string found in cell C10 (-B), and returns the value one column (that 3rd parameter) to the right of that cell (the Width).</p>
      <p class="para_division">The formula in cell B5 is similar:</p>
      <p class="para_division">=@VLOOKUP(C10,A16..D19,2)</p>
      <p class="para_division">In this case, VLOOKUP searches the first column of the range for the string in cell C10, and returns the value two columns to the right of that cell, the Height.</p>
      <p class="para_division">As you can see, the current values for width, height, and thickness correspond to the table entries for the -B variation. If you change the Build Variation in cell C10 to a different value, such as -A, the values of the width, height, and thickness parameters as displayed in cells C4..C8 will change.</p>
      <p class="para_division">This procedure represents a powerful technique to get variations on a theme. By using the VLOOKUP function in the spreadsheet, you can create variations on a theme where you explicitly select the variation to be constructed. If screen real estate is a problem with this technique, the variation table can be placed out of the normal viewing area. </p>
   </body>
</html>