×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Checkmate - suppressed components

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

RE: Checkmate - suppressed components

Hi,

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

(OP)
Hi -

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

Hi

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

(OP)
hi -

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

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);

RE: Checkmate - suppressed components

(OP)
hi again -
I was not aware about this predefined function > mqc_askImmediateComponent..
But excellent checker you shared....
thx so much...

lklo

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources