Cancel
Showing results for 
Search instead for 
Did you mean: 

Custom checkmate Constain

Experimenter
Experimenter

Hello Everyone

 

I am trying to creating custom checkers (or tweak the standard ootb) to find missing constrains on skethes without including UDF. I have tried:

 

      $sketch_tag << mqc_askEntities( sketch);
      $old_sketches << mqc_sort_entities_by_layer( $sketch_tag, 1-199 );

and

    ( List Parameter )    filter: {};
    ( String )            filter_label: "Filter Methods";
    ( Name Parameter )    filter_Layer_Mode: Include;
    ( List Parameter )    filter_Layer_Filter: {1-199};
                                       
    ( List )              object_list:mqc_pdqc_ask_object_list:(
                                         filter:,
                                         filter_Layer_Mode:,filter_Layer_Filter:,
                                         False); 

But the mqc_askSketchConstrainStatus2() is still looking at layer 200, where the UDF is placed.

My questing is, is it possible to constrain the "askSketchConstrainStatus2" from looking at layer 200 or is there

an other way to filter out UDF?

 

Thank you!

7 REPLIES 7

Re: Custom checkmate Constain

Siemens Genius Siemens Genius
Siemens Genius

Will this work for you? 

(List Modifiable) SketchFeatures: mqc_askSketchConstrainStatus2(  );

(List Modifiable) SketchFeaturesFiltered: Loop{
     For $sketchdata in SketchFeatures:;
     For $firstchild is first(mqc_askFeatureDependentChildren( nth(1, $sketchdata) ));
     For $layer is nth(5,mqc_askObjectDisplayData($firstchild));
     If $layer != 200 collect $sketchdata;
}; 

Re: Custom checkmate Constain

Experimenter
Experimenter

Thank you for your answer.

 

Unfortunately does it not remove the UDF on layer 200. 

Re: Custom checkmate Constain

Siemens Genius Siemens Genius
Siemens Genius

This should filter out a sketch which is on Layer 200.

 

In your example, the UDF is on layer 200 and the sketch within the UDF is on another layer?

Re: Custom checkmate Constain

Experimenter
Experimenter

All parts inside the UDF should be on layer 200, but what can be done if the sketch is on another layer? 

Re: Custom checkmate Constain

Siemens Genius Siemens Genius
Siemens Genius

So it looks like all the features of the UDF go onto the Work Layer when the UDF was inserted. Do you see that?

You can explode the UDF to see the individual features and their Layer display.

In my example, if the UDF is placed onto Layer 200 then the code, as shown earlier, should filter the UDF sketch away.

Re: Custom checkmate Constain

Experimenter
Experimenter

I see what you have been saying.

 

When I explode the UDF, I see the skethes which is on layer 200 but it still showing up in the results as a underconstrained skethes, when your code is used.

Re: Custom checkmate Constain

Siemens Genius Siemens Genius
Siemens Genius

We built the suggested code into the existing check %mqc_check_sket_fully_constrained and it is now working OK 

 

$tags_and_status << Loop {
				For $tag_and_status in $tags_and_status_orig;
				For $firstchild is first(mqc_askFeatureDependentChildren( nth(1, $tag_and_status) ));
				For $layer is nth(5,mqc_askObjectDisplayData($firstchild));
				If $layer != 200 collect $tag_and_status;
			}; 

$tags << Loop {
              For $each in $tags_and_status;
              Append {First($each)};
          };