<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%mqc_check_view_display_mode</TITLE><H1>%mqc_check_view_display_mode </H1><P CLASS="Paragraph">Classname: <B>%mqc_check_view_display_mode </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>
    Validate the shading mode of modeling views.
Parameters:
    (Integer)  allowed_shading_type   - Selection from allowed_shading_type_option list
                                        that gives valid UG shade modes;
                                        This is a mandatory parameter for the checker.
    (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 information
                                         The default value is 1 which is to log error.
    (String)  log_msg                 - User defined message to be added when the system
                                        reports the violation.
                                        The default is an empty string.
Results:
   PASS    -- if all modeling views have correct shading mode.
   FAILED  -- if any view's shading type is not in allowed shading mode.
============================================================================================
Create a new checker from this template by providing the mandatory parameters:
   1. (Must) change the class name and the category name
   2. (Must) specify the option of allowed shading_type:
        (Integer)   allowed_shading_type:1;
   3. (Optional) change log type:
        (Integer)    log_type:   1;
=============================================================================================
</PRE><PRE><FONT COLOR= blue>DefClass: %mqc_check_view_display_mode( %ug_base_checker );
</FONT></PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  Check-Mate attributes and parameters </PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )               %test_category: "Template.Modeling";
   ( String )               %displayed_name: "Check Model View Display Mode";
      
</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\">  Checker specific parameters and attributes</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( Integer Parameter )    allowed_shading_type: 1;
</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>   ( list )                 allowed_shading_type_option: 
                            {
                              WIREFRAME,
                              PARTIALY_SHADED,
                              SHADED,
                              STUDIO,
                              FACE_ANALYSIS
                            };
   ( String )               allowed_shading_type_label: "View Shading Mode";                              
  
</SPAN></FONT></PRE></DIV><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><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  -(allowed_shading_type: = 0) & -empty?(allowed_shading_type_option:) 
         Then   ug_mqc_checkViewDisplayMode( nth( allowed_shading_type:, allowed_shading_type_option:),
                                      nth( log_type:, log_type_option: ), 
                                      log_msg: )
         Else donothing;
    };


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