Cancel
Showing results for 
Search instead for 
Did you mean: 

Checkmate name filter

Hello all

 

How can you make a filter, which will look for a specific name such as, a UDF which is called 6 or a sketch called SKETCH_001:Hello?

 

Best regards

Christian Bonde

4 REPLIES 4

Re: Checkmate name filter

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

From your short description, I guess you would like to define checking logic based on two input:

- object type

- name filter

 

If there is no existing Check-Mate checker, you can simply wrap your own checker. Take a look at %UGII_BASE_DIR%\design_tools\checkmate\examples\NXOpenExamples for the 'ReportNamedObject' in all NX Open examples how to wrap your own NX Open logic as a Check-Mate checker. 

 

Hope it helps.

Re: Checkmate name filter

When writing the Checker I am using Knowledge Fusion and what I am looking for is indeed the name filter but it is by using:

mqc_askFeaturesByType()

 

Thank you for reply!  

Re: Checkmate name filter

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

If you know how to write the checking logic in KF, it will be much simpler. Otherwise, you need to use NX Open to create function and add it to KF for Check-Mate checker. 

 

Once you have got the features from mqc_askFeaturesByType, you can ask the name of the feature by using ug_askObjectName() (need to convert the feature tag which is integer returned from Check-Mate function to hostpointer in %mqc_askHostpointerOfTag). Then, apply your own name filtering logic.

 

Re: Checkmate name filter

I have done it like this, but still does not work. 

 

 	$feats << mqc_askFeaturesByType( "UDF_INS" );
        $browseable_features << mqc_askBrowseableFeatures( "include_inactive_features", false, "include_features_unable_to_make_current", true );
 
        $not_udf << Loop 
        {
            For $fea in $feats;
            if (Find( $fea, $browseable_features, "key", Identity ) != NoValue ) 
                collect $fea;
        };

        $UDF_feats << Loop 
        {
            For $each_feat in $not_udf;
            collect ug_askObjectName( %mqc_askHostpointerOfTag( $each_feat ));