Ok,
This version will only check the immediate children of the parent assembly.
Hope this helps,
Cheers,
NXj
#! NX/KF 3.0
#
DefClass: check_for_suppressed_comps ( %ug_base_checker );
( String ) %test_category: "MyCustomChecks.Modelling";
( String ) %displayed_name: "Check For Suppressed Comps";
( Boolean Parameter ) Disabled?: False;
( Boolean Parameter ) save_log_in_part: False;
# Attributes for this class
( List Modifiable ) assy: mqc_askImmediateComponent( "lib", "libufmqc", "Name", "mqc_ufkf_ask_immediate_component" );
( List Modifiable ) violations: Loop {
For $a In assy:;
For $b Is mqc_isComponentSuppressed( $a, "lib", "libufmqc", "Name", "mqc_ufkf_is_comp_suppressed" );
If ( $b = 1 ) Collect $a;
}; ;
# Checker function
(Any Uncached) do_check:
If ( (-Empty?(violations

) )
Then (mqc_log( LOG_ERROR, violations:, "Assembly contains suppressed components"))
Else (donothing);