<!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>Appendix C: Command line program (ug_check_part)</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">Appendix C: Command line program (ug_check_part)</div>
      <hr noshade="true"><a name="ndxgenid_checkmate1149"></a><a name="ndxgenid_checkmate1150"></a><table cellspacing="4" align="center">
         <tbody>
            <tr valign="top">
               <td bgcolor="#f7f7f7" colspan="1" rowspan="1" valign="top">
                  <p class="para_td"> <a class="links" href="javascript:void(0)" onclick="top.openFile('checkmate/cm_intro.html');return(false);">Overview</a></p>
               </td>
               <td bgcolor="#f7f7f7" colspan="1" rowspan="1" valign="top">
                  <p class="para_td"> <a class="links" href="javascript:void(0)" onclick="top.openFile('checkmate/concept.html');return(false);">Related Topics</a></p>
               </td>
            </tr>
         </tbody>
      </table><br><p class="para_topic"><b class="commandName">ug_check_part</b> is a command line program that lets you perform checks against NX part files via Check-Mate checker functions.You can also read the checking results of part files.
      </p>
      <p class="para_topic">The minimum requirements for this program are:</p>
      <ul>
         <li>
            <p class="para_item">a part file or part files</p>
         </li>
         <li>
            <p class="para_item">a checker/profile or checkers/profiles</p>
         </li>
      </ul>
      <p class="para_topic">For example:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"><b class="literalText">ug_check_part -checker=mqc_update_all_features partfile1.prt</b></p>
         </li>
      </ul>
      <p class="para_topic">Do not specify &ldquo;%&rdquo; for the checker name, since it is a meta character of command shells in most of the operating systems. The program searches the checker name with &ldquo;%&rdquo; a second time if it can not find the specified checker the first time. </p>
      <p class="para_topic">Incorrect usage:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"><b class="literalText">ug_check_part -checker=%mqc_update_all_features partfile1.prt</b></p>
         </li>
      </ul>
      <div class="title_division">Usage options for checking results</div>
      <p class="para_division"><b class="commandName">ug_check_part<br>         [ -checker &lt;checker_class&gt; ]<br>         [ -log_dir &lt;directory&gt; ]<br>          [ -save_result &lt; always | if_passed &gt; ]<br>          [ -output_file &lt;output_file&gt; ]<br>           [ -error_file &lt;error_output_file&gt; ]<br>         [ -exclude &lt; read_only[,non_owner] &gt; ]<br>         [ -load_and_test_components &lt; first_level | first_two_level | all_levels &gt; ]<br>          [ -pim ]<br>               [ -u=&lt;username&gt; ] [ -p=&lt;password&gt; ] [ -g=&lt;group&gt; ]<br>              [ -role=&lt;role_name&gt; ]<br>             [ -save_result_to_tc &lt;always | if_passed&gt; ]<br>          [ -help ]<br>         [ -option_file &lt;filename&gt; ]<br>          [ -folder &lt;folder&gt; ]<br>          [ &lt;part_file1 part_file2 ・&gt; ]</b></p>
      <div class="title_division">Usage options for reading results</div>
      <p class="para_division"><b class="commandName">ug_check_part<br>          [ -read_result ]<br>         [ -pim ]<br>               [ -u=&lt;username&gt; ] [ -p=&lt;password&gt; ] [ -g=&lt;group&gt; ]<br>                [ -role=&lt;role_name&gt; ]<br>          [ -read_result_from_tc ]<br>          [ -checker &lt;checker_class&gt; ]<br>          [ -output_file &lt;output_file&gt; ]<br>          [ -error_file &lt;error_output_file&gt; ]<br>          [ -option_file &lt;filename&gt; ]<br>          [ -folder &lt;folder&gt; ]<br>         [ &lt;part_file1 part_file2 ...&gt; ]</b></p>
      <div class="title_division">All command line options</div>
      <table cellspacing="3" width="554" align="center">
         <colgroup span="1">
            <col span="1" width="100*">
            <col span="1" width="98*">
         </colgroup>
         <tbody>
            <tr valign="top">
               <th align="left" bgcolor="#c0c0c0" colspan="1" rowspan="1" valign="top">
                  <p class="para_th">Command Line Options</p>
               </th>
               <th align="left" 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"><b class="literalText">-pim <br> [ -u=&lt;username&gt; ]<br> [ -p=&lt;password&gt; ]<br> [ -g=&lt;group&gt; ]<br> [ -role=&lt;role_name&gt; ]</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) Enters Teamcenter Integration mode. Teamcenter Integration login requires a username, password, group, and role.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">read_result</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) Reads the result saved in the part file or reads the result from the part file in Teamcenter if you specify the -<b class="literalText">pim</b> option. If you specify this option, the program does not perform checking.
                  </p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">save_result</b> &lt; <b class="literalText">always</b> | <b class="literalText">if_passed</b> &gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) Saves the results to the part file.</p>
                  <p class="para_td"><b class="literalText">always</b> - Always saves the result.
                  </p>
                  <p class="para_td"><b class="literalText">if_passed</b> - Saves the results only if the check passes. 
                  </p>
                  <p class="para_td">if you do not specify <b class="literalText">save_result</b>, the default is not to save the results. If you specify <b class="literalText">read_result</b>, the program ignores the <b class="literalText">save_result</b> option.
                  </p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">read_result_from_tc</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">The option is accepted only if you specify the -<b class="literalText">pim</b> option.
                  </p>
                  <p class="para_td">The program reads the result saved in Teamcenter.</p>
                  <p class="para_td">The program does not perform checking if you specify this option.</p>
                  <p class="para_td">This program ignores this option if you specify the -<b class="literalText">read_result</b> option.
                  </p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td"><b class="literalText">-save_result_to_tc &lt;always | if_passed &gt;</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">The program saves the results to Teamcenter Integration.</p>
                  <ul class="unmarkedList">
                     <li>
                        <p class="para_item"><b class="literalText">always</b> - Always saves the results.
                        </p>
                     </li>
                     <li>
                        <p class="para_item"><b class="literalText">if passed</b> - Saves the results only if the checker passes
                        </p>
                     </li>
                  </ul>
                  <p class="para_td">The program only accepts this option if you specify the <b class="literalText">pim</b> option. The default is not to save the result if you do not specify this option. If you specify this option and the <b class="literalText">save_result</b> switch is not specified, the <b class="literalText">save_result</b> switch is set to the same value as this option. This program ignores this option if you specify the <b class="literalText">read_result</b> or <b class="literalText">read_result_from_tc</b> option. 
                  </p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">option_file</b> &lt;filename&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Name of text file which contains options.  Each line in the file contains one option.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">folder </b>&lt;folder&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) Checks all the part files under &lt;folder&gt;. </p>
                  <p class="para_td">If you specify -<b class="literalText">pim</b>, the part files in the Teamcenter Engineering folder &lt;folder&gt; are retrieved for checking according to the part file load options. For example, if multiple revisions of the part files exist in the same folder, only one revision is loaded for checking based on the load options. The ':' is used as a delimiter for the folder path in Teamcenter to separate the names in the folder path, for example: &quot;Dow:Test Parts&quot;.
                  </p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">checker</b> &lt;<b class="literalText">checker_class</b>&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) The <b class="literalText">checker_class</b> specified is used for checking or reading results. If not specified, the environment variable UG_CHECKMATE_DEFAULT_CHECKER must be defined to specify the checker or profile to use.
                  </p>
                  <p class="para_td">The checker_class option overwrites the environment variable.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">log_dir</b> &nbsp;&lt;directory&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) Lets you save the result to an external file under the &lt;directory&gt; you specify.</p>
                  <p class="para_td">You can save the results in xml format or mqclog format. By default, the program saves the results in xml format. Set environment variable UGII_CHECKMATE_OUTPUT_MQCLOG to value '1' or 'true' to output the result in mqclog format.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">output_file</b> &lt;output_file&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) Saves the messages to the output_file.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">error_file</b> &lt;error_output_file&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) Saves error messages to the error_output_file.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">load_and_test_components</b>  <b class="literalText">&lt; first_level | first_two_levels | all_levels &gt;</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Checks component parts of the specified assembly.</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">This option supports NX native mode only. Teamcenter Integration ignores this option.</p>
                           </div>
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">exclude &lt; read_only,non_owner &gt;</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Exclude parts from checking that are read-only or owned by others.</p>
                  <ul class="unmarkedList">
                     <li>
                        <p class="para_item"><b class="literalText">read_only</b> - exclude read-only parts.
                        </p>
                     </li>
                     <li>
                        <p class="para_item"><b class="literalText">non-owner</b> - .exclude parts owned by others.
                        </p>
                     </li>
                  </ul>
                  <p class="para_td">You can combine multiple options with a comma &ldquo;,&rdquo; delimiter or use a single option as follows:</p>
                  <ul class="unmarkedList">
                     <li>
                        <p class="para_item">-exclude read_only</p>
                     </li>
                     <li>
                        <p class="para_item">-exclude non_owner</p>
                     </li>
                     <li>
                        <p class="para_item">-exclude read_only,non_owner</p>
                     </li>
                  </ul>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">u</b>=&lt;username&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">User name used to log into Teamcenter Engineering</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">p</b>=&lt;password&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Password used to log into Teamcenter Engineering.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">g</b>=&lt;group&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Group name used to log into Teamcenter Engineering.   </p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td"><b class="literalText">-role</b>=&lt;role_name&gt;
                  </p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Role name used to log into Teamcenter Engineering.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">help</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">Displays the utilities help.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">-<b class="literalText">gm_help</b></p>
               </td>
               <td bgcolor="#F4F4F4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">GM Specific Help. List the options applicable only for GM environment.</p>
               </td>
            </tr>
            <tr>
               <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">&lt;partfiles...&gt;</p>
               </td>
               <td bgcolor="#f4f4f4" colspan="1" rowspan="1" valign="top">
                  <p class="para_td">(optional) the part files to check. </p>
                  <p class="para_td">Use CLI format name (i.e. &quot;@DB/00030/A&quot;), if -pim  option is specified.</p>
                  <p class="para_td">Multiple part files can be specified. The &lt;partfiles&gt; option must be the last argument.</p>
               </td>
            </tr>
         </tbody>
      </table><br></body>
</html>