<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%mqc_check_drawing_master_model</TITLE><H1>%mqc_check_drawing_master_model </H1><P CLASS="Paragraph">Classname: <B>%mqc_check_drawing_master_model </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>
    Check whether the work part is master model drawing or not.
Parameters:
   (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.
   (Integer)  log_type         -  Indicate which logging type to use to report the violation.
                                  1 - LOG_ERROR,
                                  2 - LOG_WARNING,
                                  3 - LOG_INFO,
                                  Default is 1 to log error.
   (String)   log_msg          -  User defined message to be added when the system
                                  reports the violation.
                                  Default is an empty string.
Results:
   PASS    -- If the file is master model drawing.
   FAILED  -- If the file does not qualify master model drawing.
</PRE><PRE><FONT COLOR= blue>DefClass: %mqc_check_drawing_master_model( %ug_base_checker );
</FONT></PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )    %test_category: "Drafting";
   ( String )    %displayed_name: "Check Master Model Drawing";
   
</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_option                                       </PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   (Integer Parameter )     log_type: 1;
</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>   ( list )                 log_type_option: { LOG_ERROR, LOG_WARNING, LOG_INFO };
   ( string )               log_type_label: "Log Option";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( string Parameter )     log_msg: "";
</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( string )               log_msg_label: "Log Message";
   
   
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">
                    0  -- the part is master model drawing.
                    1  -- the part is master model drawing.
                          The component contains blank drawing sheet.
                    2 -- NOT_ASSEMBLY        : the part does not have model component.
                    3 -- NOT_DRAWING         : the part does not contain drawing data
                    4 -- BLANK_DRAWING_SHEET : the part contains blank drawing sheet.
                    5 -- HAS_SOLID           : drawing file contains solid data
                    6 -- MUILT_COMP          : drawing file is linked to multiple part files
                    7 -- COMP_NOT_LOAD       : the component part is not loaded
                    8 -- DIFF_XFORM          : drawing and model has different transformation identity
                    9 -- COMP_PARTIAL_LOAD   : component is partially loaded
                    10 -- COMP_HAS_DRAWING   : component has drawing data
</PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">   Checker function</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   (Any Uncached)   do_check: 
   @{
           $ret_code << mqc_validate_master_drawing(); 
           
           $usr_msg << If ( log_msg: = "" ) Then "" Else log_msg:+"~n";
           
           $detail_msg <<
           If ( $ret_code = 1 )
           Then "The part is master model drawing,~n"
                +"although its model component contains blank drawing sheet."
           Else If ( $ret_code = 2 )
           Then "The part is not master model drawing,~n"
                + "because it does not have component part file."
           Else If ( $ret_code = 3 )
           Then "The part is not master model drawing,~n"
                 +"because it does not contain drawing data."
           Else If ( $ret_code = 4 )
           Then "The part is not master model drawing,~n"
                 +"because it contains blank drawing sheet."
           Else If ( $ret_code = 5 )
           Then "The part is not master model drawing,~n"
                 +"because it contains solid data."
           Else If ( $ret_code = 6 )
           Then "The part is not master model drawing.~n"
                 +"It is linked to multiple part files."
           Else If ( $ret_code = 7 )
           Then "Not able to check whether it is master model drawing or not unless ~n"
                 +"the component part is fully loaded."           
           Else If ( $ret_code = 8 )
           Then "The part is not master model drawing.~n"
                 +"Drawing and model file has different transform identity."  
           Else If ( $ret_code = 9 )
           Then "Not able to check whether it is master model drawing or not unless ~n"
                 +"the component part is fully loaded."           
           Else If ( $ret_code = 10 )
           Then "The part is not master model drawing,~n"
                 +"because the model component contains drawing data."  
           Else "";
                  
                       
           If member( $ret_code, {2, 3, 4,5,6,8,10} )
           Then 
             ug_mqc_log( nth( log_type:, log_type_option: ), {}, $usr_msg+$detail_msg )
           Else If  ( $ret_code = 1 )
           Then
             ug_mqc_log( LOG_INFO, {}, $usr_msg+$detail_msg )
           else if member( $ret_code, {7, 9} )
           then
            ug_mqc_log( LOG_WARNING, {}, $usr_msg+$detail_msg )
           Else donothing;  
};

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