<!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>Refile Examples</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"> Refile Examples</div>
      <hr noshade="true">
      <p class="para_topic"> Single file names that are given as input must have their full filenames specified, specifically they must include their full extensions (e.g., &quot;filepart.prt&quot;, and not just &quot;filepart&quot;).</p>
      <p class="para_topic"> Here are some basic examples of invoking  <em>refile_part</em>:
      </p>
      <table bgcolor="#F7F7F7" border="0" cellpadding="2" cellspacing="3" width="100%" align="center">
         <tr>
            <td colspan="1" height="31" rowspan="1" valign="top">
               <p class="para_td"> refile_part</p>
            </td>
            <td colspan="1" height="31" rowspan="1" valign="top">
               <p class="para_td"> prints help list of option switches</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td"> refile_part -d</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td"> (converts all parts in the current directory)</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td"> refile_part bolt.prt</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td"> (converts only the file bolt.prt)</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td"> refile_part lever.udf</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td"> (converts only the file lever.udf)</p>
            </td>
         </tr>
      </table><br><p class="para_topic"> Additional details are provided below for the  <em>refile_part</em> option switches (examples are given only for UNIX):
      </p>
      <div class="title_division"> -d [directory name]</div>
      <p class="para_division"> The -d switch tells the system to expect a directory rather than a part name or UDF as input. Using a -d without a directory name means to convert the current directory. Using a -d with a directory name means to convert the given directory. To convert a directory, you must use the -d switch.</p>
      <p class="para_division"> Examples:</p>
      <p class="para_division"> Convert all parts in the current directory.</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -d</p>
         </li>
      </ul>
      <p class="para_division"> Convert all parts in a specified directory (in this case, dir_a).</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -d /users/john/dir_a</p>
         </li>
      </ul>
      <div class="title_division"> -s</div>
      <p class="para_division"> When the -s switch is specified, parts encountered in subdirectories are also converted. This switch can only be used in conjunction with the -d switch, since it applies only to directories. The -s switch does not take any arguments.</p>
      <p class="para_division"> Examples:</p>
      <p class="para_division"> Convert all parts in the current directory, including those in subdirectories.</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -s -d</p>
         </li>
      </ul>
      <p class="para_division"> Convert all parts in a specified directory, including those in subdirectories (in this case, dir_a).</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -s -d /users/john/dir_a</p>
         </li>
      </ul>
      <div class="title_division"> -o [output part or output directory name]</div>
      <p class="para_division"> The purpose of the -o switch is to retain the original versions of the part (or parts) being converted, and to create a new part (or parts) with the specified name, or in the specified directory.</p>
      <p class="para_division"> The argument to the -o switch is a new part filename, unless a -d switch is specified, in which case it is a destination directory name.</p>
      <p class="para_division"> If the argument to the -o switch is a directory, you must create the output directory before executing the  <em>refile_part</em> program.
      </p>
      <p class="para_division"> If the -o switch is used in conjunction with the -d and -s switches, the -o switch applies to the output directory. Subdirectories of the input directory retain their original names in the resulting directory structure.</p>
      <p class="para_division"> The argument accompanying the -o switch must match its input. This means that if the input is a directory, the output must be a directory; if the input is a part file, the output must be a part file.</p>
      <p class="para_division"> If the argument for the -o switch is a directory, the top-level directory  <em>must already exist</em>. If subdirectories are being converted (i.e., the -s switch is used), the output subdirectories are created by the program. They should not already exist.
      </p>
      <p class="para_division"> If the argument with the -o switch is a part, that part must not already exist.</p>
      <p class="para_division"> Examples:</p>
      <p class="para_division"> Convert the part piping.prt, and name the converted part, piping_new.prt.</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part piping.prt -o piping_new.prt</p>
         </li>
      </ul>
      <p class="para_division"> Convert the part piping.prt, and name the converted part, my_piping_new.prt in the directory /my_parts_dir/dir_1.</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part piping.prt -o /my_parts_dir/dir_1/my_piping_new.prt</p>
         </li>
      </ul>
      <p class="para_division"> Convert all of the parts in the current directory and save the converted parts in the directory, output_dir (the output directory must already exist).</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -d -o output_dir</p>
         </li>
      </ul>
      <p class="para_division"> Convert all parts in the current directory, including those in subdirectories, and save the converted parts in the directory, output_dir. This command will convert all parts in the current directory and its subdirectories and will create a new subdirectory structure that it will add to the output_dir directory (note that the output_dir must already exist).</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -s -d -o output_dir</p>
         </li>
      </ul>
      <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"> &nbsp;  Use caution when using -o with -y. When the -o switch (save part under a new file specification) is used with the -y switch (convert assemblies), the parent assembly is saved under a new file specification, and the original parent assembly remains unchanged. However, all original components and sub-assemblies contained within the parent assembly are overwritten and refiled as the current part version.</p>
               </div>
            </td>
         </tr>
      </table>
      <div class="title_division"> -y</div>
      <p class="para_division"> The purpose of the -y switch is to recursively, load and convert an entire assembly including its components.</p>
      <p class="para_division"> Example:</p>
      <p class="para_division"> Load and convert the entire assembly, fixture5.</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -y fixture5.prt</p>
         </li>
      </ul>
      <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"> &nbsp;  The -y switch will perform a recursive conversion on the entire assembly. Be aware that using the -y switch with large assemblies may be time consuming and potentially resource intensive.</p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_division"> The -y switch can recursively convert both current version and earlier version assemblies. Recursively means that all components throughout the parent assembly and sub-assemblies are converted.</p>
      <p class="para_division"> Two additional switches work with the -y switch. These are -g and -c (described below). The -g and -c switches only apply to pre-V10 parts, and do not affect the conversion of a current version part.</p>
      <p class="para_division"> The -y switch causes refile_part to fully load components. The -y switch also allows refile_part to not abort on a failure when loading components.</p>
      <p class="para_division"> When working with pre-V10 assemblies using the -y switch, it converts the parent assembly only, not its components. To recursively convert the components, the -g switch must be used with the -y switch (please see the description for the -g switch).</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"> &nbsp;  Use caution when using -o with -y. When the -o switch (save part under a new file specification) is used with the -y switch (convert assemblies), the parent assembly is saved under a new file specification, and the original parent assembly remains unchanged. However, all original components and sub-assemblies contained within the parent assembly are overwritten and refiled as the current part version.</p>
               </div>
            </td>
         </tr>
      </table>
      <div class="title_division"> -c</div>
      <p class="para_division"> The -c switch creates components in the same way NX creates components when the Upgrade Components dialog box's,  <em>Create Component if Required</em>, option is set  <em>on.</em> The -c switch can only be used with the -g option switch.
      </p>
      <div class="title_division"> -g</div>
      <p class="para_division"> During execution, refile_part displays information messages to the standard output device. When the -g switch is used, the names of the immediate components found in the parent assembly are displayed as they are upgraded. The names of components contained within sub-assemblies are upgraded, but they are not displayed. In all cases, the components are not displayed as they are converted to current version parts.</p>
      <p class="para_division"> The -g switch upgrades all pre-V10 components so they are converted to current version parts. The -g switch emulates the NX behavior of the Upgrade Components dialog box's  <em>Upgrade All</em> action button, with the scope set to Whole sub-assembly.
      </p>
      <div class="title_division"> -r</div>
      <p class="para_division"> The purpose of the -r switch is to echo the release of the refile_part image. This switch can be used in conjunction with any of the other switches, and will output the resultant release prior to doing the conversion.</p>
      <p class="para_division"> Example:</p>
      <p class="para_division"> Echo the release.</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -r</p>
            <p class="para_item"> OUTPUT: V10.4</p>
         </li>
      </ul>
      <div class="title_division"> -l [filename]</div>
      <p class="para_division"> The -l switch logs a short report about the conversion to the system log. If you include a filename after the switch, the report is also written to a text file with the name  <em>filename</em>.
      </p>
      <p class="para_division"> Example:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -s -d -l report.txt</p>
         </li>
      </ul>
      <p class="para_division"> This command converts all part files in the current directory and any subdirectories, and also creates a short log file named report.txt with details about the conversion.</p>
      <div class="title_division"> -ll [filename]</div>
      <p class="para_division"> The -ll switch logs an extended report about the conversion to the system log. If you include a filename after the switch, the report is also written to a text file with the name  <em>filename</em>.
      </p>
      <p class="para_division"> Example:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -s -d -ll report.txt</p>
         </li>
      </ul>
      <p class="para_division"> This command converts all part files in the current directory and any subdirectories, and also creates an extended report file named report.txt with details about the conversion.</p>
      <div class="title_division"> -u</div>
      <p class="para_division"> Use the -u switch to specify that you want user defined features files (i.e., UDF files) converted as well as any part files.</p>
      <p class="para_division"> Example:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -d -u</p>
         </li>
      </ul>
      <div class="title_division"> -uo</div>
      <p class="para_division"> Use the -uo switch to specify that you want only user defined features files (i.e., UDF files) converted. Part files are not converted.</p>
      <p class="para_division"> Example:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> refile_part -d -uo  </p>
         </li>
      </ul>
   </body>
</html>