<!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>Program Interaction</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"> Program Interaction</div>
      <hr noshade="true">
      <p class="para_topic"> The unit conversion program is a stand-alone external Open C and C++ API program. You can execute the program from the UGADMIN&rarr;UNIX SHELL option of the UniProducts main menu, UGMENU, although an operating system prompt will also usually work.</p>
      <div class="title_division"> Syntax</div>
      <p class="para_division"> At the operating system prompt, type:</p>
      <p class="para_division"> ug_convert_part -mm|-in -[o s u uo x y] [-o&nbsp;&lt; <em>dirname</em>&gt;] &lt;part_name&gt;|-d&nbsp;[&lt; <em>dirname</em>&gt;]
      </p>
      <p class="para_division"> Options in brackets are not required. Options separated by the pipe character `|' mean that you must provide either the option before the pipe or the option after the pipe, but not both. The first set of options, -mm | -in, denotes the units you are converting to, and are not optional. You must either use  <em>-mm</em> to convert to millimeters or  <em>-in</em> to convert to inches.
      </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 must provide either a part_name or a -d option (with an optional dirname). </p>
               </div>
            </td>
         </tr>
      </table>
      <table border="0" cellpadding="2" cellspacing="3" width="100%" align="center">
         <tr>
            <th bgcolor="#c0c0c0" colspan="1" rowspan="1" valign="top">
               <p class="para_th"> Option</p>
            </th>
            <th bgcolor="#c0c0c0" colspan="1" rowspan="1" valign="top">
               <p class="para_th"> Description</p>
            </th>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -d</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Sets current directory as the source</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -d &lt;dirname&gt;</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Sets the directory &lt;dirname&gt; as the source</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -in</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Converts to inch units</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -mm</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Converts to metric units</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -o &lt;dirname&gt;</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Sets the directory &lt;dirname&gt; as the destination</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -s</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Traverses subdirectories</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -u</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Converts UDFs (user defined features)</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -uo</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Converts only UDFs (user defined features)</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -x</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Exports the annotated expressions to a &lt;filename&gt;.exp_txt file</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -y</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Converts entire assembly</p>
            </td>
         </tr>
      </table><br><p class="para_division"> The results of the expression conversion are written to the screen and to the syslog file.</p>
      <div class="title_division"> Examples of using ug_convert_part</div>
      <p class="para_division"> The program requires the option -in or -mm (but not both). Also, a part name, a wildcard or -d option must be specified.</p>
      <p class="para_division"> Following are some design specific examples for calling the conversion program:</p>
      <ul>
         <li>
            <p class="para_item"> ug_convert_part -in a.prt</p>
            <p class="para_item"> Converts and overwrites a.prt to inches.</p>
         </li>
         <li>
            <p class="para_item"> ug_convert_part -mm a.prt</p>
            <p class="para_item"> Converts and overwrites a.prt to millimeters.</p>
         </li>
         <li>
            <p class="para_item"> ug_convert_part -mm -y assy.prt</p>
            <p class="para_item"> Converts and overwrites assy.prt and all its components to millimeters.</p>
         </li>
         <li>
            <p class="para_item"> ug_convert_part -in -d</p>
            <p class="para_item"> Converts and overwrites all parts in the current directory to inches.</p>
         </li>
         <li>
            <p class="para_item"> ug_convert_part -in -s -d&nbsp;/parts/millimeter_parts -o&nbsp;/parts/inches_parts</p>
            <p class="para_item"> Converts and overwrites all parts in /parts/millimeter_parts and its sub-directories to inches and places the resulting parts in a flat directory /parts/inches_parts. Parts that are already in inches are not copied to the destination directory.</p>
         </li>
         <li>
            <p class="para_item"> ug_convert_part -in /users/test/convert_test.prt -o&nbsp;/users/test/subtest</p>
         </li>
      </ul>
      <p class="para_division"> Converts convert_test.prt in /users/test/ to inches and places the resulting part in /users/test/subtest.</p>
      <div class="title_division">Input Exceptions</div>
      <p class="para_division"> The program does not allow some combinations of input. They are:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"> The use of -u with -uo.</p>
            <p class="para_item"> The combination -u or -uo with -o or.</p>
            <p class="para_item"> The use of -y with -d.  </p>
         </li>
      </ul>
   </body>
</html>