Checkmate - suppressed components
Checkmate - suppressed components
(OP)
Hi -
Do anybody here on board , know if it should be possible to check for suppressed components in a NX assembly.
I'm running NX 8.5...
lklo
Do anybody here on board , know if it should be possible to check for suppressed components in a NX assembly.
I'm running NX 8.5...
lklo





RE: Checkmate - suppressed components
Try this basic checker:-
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: ug_askAssemblyComponents( );
( 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);
RE: Checkmate - suppressed components
Thank you so much for sharing this checker....
-I will use your checker sample as a starting point for me...
In my case I only need to check for components in current workpart - what I mean is only 1.level of assembly..
I have done this in a checker where I call a external NXOpen program (compiled VB) and return a list into the dfa checker.
But runtime is slow by doing it this way - and I will try to do all the stuff inside a dfa checker, without "leaving" dfa and go to a external program...
lklo
RE: Checkmate - suppressed components
On assembly navigator right click on the top bar
And check the box of "include suppressed component "
Maybe that's not your intentions but it shows
The suppressed component in blue.
RE: Checkmate - suppressed components
thx - and yes your are right...
But I will run checkmate on thousands of parts in one shot, and need checkmate to help with this...
lklo
RE: Checkmate - suppressed components
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);
RE: Checkmate - suppressed components
I was not aware about this predefined function > mqc_askImmediateComponent..
But excellent checker you shared....
thx so much...
lklo