<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%mqc_report_component</TITLE><H1>%mqc_report_component </H1><P CLASS="Paragraph">Classname: <B>%mqc_report_component </B></P><P CLASS="Paragraph">Inherits from: <B><A href=..\checkmate\xug_base_checker.html>%ug_base_checker </A></B></P><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"> </PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">
<B>Description:</B>
  Report all components in an assembly.
  This checker lists file names of all components include suppressed ones.
  Under NX Native Mode, if component are loaded, then the component names
  are with the directory path, else the component names are only simple
  part names without path.
  Under NX Manager Mode, whether components are loaded or not, the component
  names are built up as:
       @DB/Item_Name/Item_Revision
Parameter:
    (Boolean)  disabled?        -  If it is true, the checker is disabled.
                                   Default is False.
    (Boolean)  save_log_in_part -  The flag indicates whether the checking results can
                                   be saved to the part file
                                   Default is True.
    (String)   log_msg          -  User defined message to be added when the system
                                   reports the violation.
                                   Default is an empty string.
Result:
  Report the count of components in part.
</PRE><PRE><FONT COLOR= blue>DefClass: %mqc_report_component( %ug_base_checker );
</FONT></PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )               %test_category: "Get information.Assemblies";
   ( String )               %displayed_name: "Number of Components";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( Boolean Parameter )    disabled?: false;
   ( Boolean Parameter )    save_log_in_part: true;
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  parameter for log_message     </PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( string Parameter )     log_msg: "";
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  checking ...</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( string )               log_msg_label: "Log Message";
   
</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( Any Uncached ) do_check:

   If ( mqc_isAssemblyPart( ug_askCurrentWorkPart() ) = FALSE )

   Then ug_mqc_log( LOG_INFO, {}, "The test is skipped since it is not an assembly part." )

   Else
   @{
         $assembly_structure << mqc_ask_assembly_structure();
         $comp_list << Sublist( $assembly_structure, 2, Length( $assembly_structure ) );

         $detail_msg << @{ "Found " + Stringvalue( Length( $comp_list ) ) + 
                           " component(s) in part."; }+

                        @{ If ( Length( $comp_list ) > 0 )
                           Then "~nFollowing list the file names of all components:~n    "
                           Else ""; }+

                        @{ mqc_list_to_string( $comp_list, "~n   " ); };


   
         $usr_msg << If ( "" = log_msg: ) Then "" Else log_msg: + "~n";

         ug_mqc_log( LOG_INFO, {}, $usr_msg + $detail_msg );
   };

</SPAN></FONT></PRE></DIV></TABLE><p class=EndLine>&nbsp;</p><p class=blank>&nbsp;</p></BODY></HTML>