<!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>Inspect Part Files</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">Inspect Part Files</div>
      <hr noshade="true">
      <p class="para_topic"> ug_inspect is a part file inspection utility that performs two functions:</p>
      <ul>
         <li>
            <p class="para_item"> It reports basic information about the contents of a part file, such as format, version, filing history, and part file compression.</p>
         </li>
         <li>
            <p class="para_item"> It extracts the Parasolid data from a part file, creating a Parasolid transmit file.</p>
         </li>
      </ul>
      <p class="para_topic"> ug_inspect executes stand-alone in the operating system.</p>
      <div class="title_division">Starting UG_INSPECT</div>
      <p class="para_division"> To start ug_inspect, type:</p>
      <p class="para_division"> ug_inspect &lt;part filenames&gt;</p>
      <p class="para_division"> You can specify multiple part files by entering the filenames delimited by spaces. You must include the &quot;.prt&quot; file extension with any part file you want to inspect. For example, to inspect three files, type the following:</p>
      <p class="para_division"> ug_inspect file_a.prt file_b.prt file_c.prt</p>
      <div class="title_division">Options</div>
      <table border="0" cellpadding="2" cellspacing="3" width="100%" align="center">
         <tr>
            <th align="left" bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_th"> Option</p>
            </th>
            <th align="left" bgcolor="#f4f4f4" 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"> -help</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints all the switches in this table.</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -rm</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints Record Manager partition</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -cmod</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints CMOD partition</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -ess</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints the Expresssion partition</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -occ</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints the Occurrences partition</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -path</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints Path partitions</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -ps</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints Parasolid partition(s)</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -full</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints all partitions</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -trace</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints tracing info as it reads the part</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -cookies</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints cookie and object id information</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -refs</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints most recent referenced part information</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -all_refs</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Prints all referenced part information</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -scan</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Scans for known part corruptions</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -extract_all &lt;part file&gt; [&lt;filename&gt;] -extract &lt;id&gt; &lt;part file&gt; [&lt;filename&gt;]</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Extracts Parasolid transmit files - &lt;id&gt; is a partition id number, &lt;part file&gt; is a part filename, and &lt;filename&gt;, if specified, is the filename without extension to use for generating output filenames. If omitted this is generated from the part filename. Use -extract_all for pre-v12 part files.</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> -release</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Just print release information about the part</p>
            </td>
         </tr>
      </table><br><div class="title_division"> Reporting Part File Contents</div>
      <p class="para_division"> The ug_inspect utility reports data on the following items.</p>
      <ul>
         <li>
            <p class="para_item"> History of when the part was saved, including:</p>
            <p class="para_item">UG release number </p>
            <p class="para_item">Date and time</p>
            <p class="para_item">User Name</p>
            <p class="para_item">Node name</p>
            <p class="para_item">Machine format</p>
            <p class="para_item">Whether the part was filed by a Open C and C++ API program</p>
         </li>
         <li>
            <p class="para_item"> Contents of the part, including:</p>
            <p class="para_item">Part units (inches/metric)  </p>
            <p class="para_item">List of object types found in the part </p>
            <p class="para_item">Part header information (status, description, user area) </p>
            <p class="para_item">Part format e.g. whether it was selectively filed) [pre V10 parts only] </p>
            <p class="para_item">Size of the entire part and of each non-empty directory within the part and whether it is compressed. </p>
            <p class="para_item">Type of patterns data (shaded or wireframe), if any</p>
         </li>
         <li>
            <p class="para_item"> Simple analysis:</p>
            <p class="para_item"> Checks whether the part contains an old version of UGConcept data, preventing it from being directly retrieved in V10.x</p>
            <p class="para_item"> Checks whether the part appears to be corrupted as a result of using ftp (in ASCII mode) to copy the 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">  All dates and times are reported relative to the local time zone. Therefore, if you create a file at 9:00 and send it to someone three time zones away and that person runs ug_inspect on the part, the output indicates that the part was saved at 6:00.</p>
                     </div>
                  </td>
               </tr>
            </table>
         </li>
      </ul>
      <div class="title_division">Error Messages</div>
      <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">  A new version of ug_inspect is released with every major NX release. If you run an older version of ug_inspect on a part file created in the latest version of NX, you may get the following ug_inspect warning:</p>
               </div>
            </td>
         </tr>
      </table><pre class="indent"> Release number xx is unknown - are you using the latest version of ug_inspect?</pre><p class="para_division"> Any other ug_inspect error messages (such as &quot;Unexpected end of file&quot;) usually indicate that there is something drastically wrong with the part file.</p>
      <div class="title_division">Content Highlights</div>
      <p class="para_division"> The contents of the ug_inspect report vary somewhat depending on the release with which the part was last filed. The preceding report for cvk.prt is a typical display for a V10 or later part. The following is a description of some of the most useful information contained in the report:</p>
      <ul>
         <li>
            <p class="para_item"> Non-empty entity type chains - This is a list of &quot;RM entity&quot; types that exist in the part. RM entities are a subset of all object types that exist in NX. The cvk.prt file contains lines, arcs, layer categories, dimensions, sketches, solids, datum planes, etc.</p>
         </li>
         <li>
            <p class="para_item"> Release - This is the NX release with which the part was last saved. If the release number of the part is less than the version of NX you are running, the part goes through an on-the-fly conversion when it is opened in NX. On the other hand, if the release number of the part is greater than your version of NX, it cannot be opened in that version. The cvk.prt part is in V10.3 format so it can be opened in V10.3 or later, but not in V10.2.</p>
         </li>
         <li>
            <p class="para_item"> Part Units - This is either Inches or Millimeters and corresponds to the option specified when the part was first created. The cvk.prt part is defined in inches.</p>
         </li>
         <li>
            <p class="para_item"> Pre V10 filing history - If the part was created prior to V10, this entry contains a list of all pre V10 releases with which the part was filed. The cvk.prt part was originally created in V9.1.</p>
         </li>
         <li>
            <p class="para_item"> V10 filing history - Starting with V10, a save audit entry is recorded in the part file every time it is saved. The ug_inspect report lists in reverse chronological order all save audit entries, each of which contains the following information:</p>
         </li>
      </ul>
      <table border="0" cellpadding="2" cellspacing="3" width="100%" align="center">
         <tr>
            <th align="left" bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_th"> Item</p>
            </th>
            <th align="left" bgcolor="#f4f4f4" 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"> Version</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> This is a number that is set to 1 the first time the part is saved in and then incremented for every save. There might actually be some gaps in the version numbering but that does not indicate a problem with the part.</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Save Time</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> The date and time of the save.</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Machine</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> The type of workstation on which the part was saved.</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> User</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> The name of the NX operator saving the part.</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> Program</p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
               <p class="para_td"> The name of the program. This is usually some version of NX, but might also be the name of a translator or Open C and C++ API program.</p>
            </td>
         </tr>
      </table><br><p class="para_division"> The ug_inspect report for cvk.prt indicates that the part was saved four times in V10.x, the first three times by DOE in V10.2 on an Alpha VMS machine and the last time by SMITH in V10.3 on an HP Risc machine.</p>
      <ul>
         <li>
            <p class="para_item"> Filing history outside UG - This indicates whether the part was ever filed by a program other than NX, such as a Open C and C++ API program.</p>
         </li>
         <li>
            <p class="para_item"> Part file size - number of bytes in the part.</p>
         </li>
         <li>
            <p class="para_item"> Components can be added to this part - This is TRUE unless the File&rarr;Utilities&rarr;Enforce Piece Part switch is set for this part.</p>
         </li>
         <li>
            <p class="para_item"> Pattern data - Indicates whether the part contains pattern data. The values of this field can be:</p>
            <p class="para_item">&lt;none&gt;</p>
            <p class="para_item"> Wireframe only</p>
            <p class="para_item"> Wireframe and shaded</p>
         </li>
         <li>
            <p class="para_item"> Machine format - Operating system format used to file the part.</p>
         </li>
         <li>
            <p class="para_item"> Unique part identifier (UID) - Starting with V10, each part is assigned a UID when it is created. The UID resides in the part file and is preserved for the life of the part - no matter how many times it is resaved or renamed in the operating system.</p>
         </li>
         <li>
            <p class="para_item"> Status - A number which can be set in NX under File&rarr;Utilities... or via a Open C and C++ API program. The status of cvk.prt is 10.</p>
         </li>
         <li>
            <p class="para_item"> Description - A character string which can be set in NX under File Utilities... or via a Open C and C++ API program. The description field of cvk.prt is set to &quot;Checked and ready for sign-off&quot;.</p>
         </li>
         <li>
            <p class="para_item"> Customer area - A character string which can only be set via a Open C and C++ API program. The customer area of cvk.prt is not set.</p>
         </li>
      </ul>
      <p class="para_division"> If ug_inspect encounters a pre V10 part that can not be automatically converted into V10 (for example, a pre V9 part that contains UGConcept data), it prints the following error message:</p><pre class="indent">This file cannot be directly retrieved into V10Refile the part in V9.1 first</pre><p class="para_division">If ug_inspect encounters a part which appears to have been corrupted by having been copied in FTP using ASCII rather than binary mode, it prints the following error message:</p><pre class="indent">Part file probably corrupted by ASCII FTP from HP RiskParts should be copied using binary (not ASCII) mode FTP</pre><div class="title_division"> Extracting Parasolid Data</div>
      <p class="para_division"> You might want to extract Parasolid data from a part file so that you can access that data from a Parasolid program or you might want to import that Parasolid data into another part file.</p>
      <p class="para_division"> To extract Parasolid data from a part file, use the following ug_inspect command.</p>
      <p class="para_division"> &gt;ug_inspect &lt;id&gt; -extract &lt;part-file&gt; [&lt;xmit-file&gt;]</p>
      <p class="para_division"> where &lt;id&gt; is the partition id number, &lt;part-file&gt; is the name of a part file containing the Parasolid data and &lt;xmit-file&gt; is the name of the transmit file that is to be created. The &lt;xmit-file&gt; can be omitted in which case the transmit filename is the same as the part filename but with a different file extension.</p>
      <p class="para_division"> &gt;ug_inspect -extract solid_model.prt</p><pre class="indent"> Extracted Parasolid data into file solid_model.xmt_bin Parasolid Version: 7.00.049 File format: binary</pre><p class="para_division"> Since no transmit file was specified on the command line, ug_inspect created one (solid_model.xmt_bin) based on the part filename (solid_model.prt). The extension used for the transmit file is either xmt_bin (for binary) or .xmt_txt (for text). Pre-V10 parts contain Parasolid data in text format; later parts use binary.</p>
      <p class="para_division"> If you specify a transmit filename with an extension that is inconsistent with the format of the Parasolid data, ug_inspect prints a warning message but extracts the data nonetheless.</p>
      <p class="para_division"> &gt;ug_inspect -extract solid_model.prt solid_model.xmt_txt</p><pre class="indent"> Warning: Binary transmit files should use the .xmt_bin extension Extracted Parasolid data into file solid_model.xmt_txt Parasolid Version: 7.00.049 File format: binary</pre></body>
</html>