Skip to main content
1-Visitor
August 13, 2015
Question

Automatically suppress multiple features at once with a rule

  • August 13, 2015
  • 3 replies
  • 2842 views

Can I automatically suppress multiple features at one time within Creo? For example, can I define a rule that says to suppress all holes with a diameter of 6mm or less?

    3 replies

    1-Visitor
    August 13, 2015

    Pretty sure you can do that through Pro/Program (Program). An IF THEN ELSE statement(s) should get you the results you want.

    Program.jpg

    12-Amethyst
    August 13, 2015

    Explore the search tool.

    For example:

    You can create a search with two rules, the first select all the hole features like shown above:

    1.png

    the second rule select the ones that have the pretended dimension:

    2.png

    You can save this query too for later use.

    Explore a little this tool to see how powerful it can be.

    Another option is to create a layer with the previous rules, then you just have click on the layer, "select items" and "supress".

    I found recently that is possible to copy layers from one model to another, this is really handy because you can have a model with all these layers with associative filters and just copy paste it to another.

    Jose

    23-Emerald IV
    August 13, 2015

    Jose Costa‌,

    Can you please confirm that "AND" works correctly is this specific case?  In Creo 3 M050 it seems to be ignoring the "AND" and treating the compound query like "OR".

    12-Amethyst
    August 14, 2015

    Yes, the "and" condition is working. The problem is that this filter selects all kind of dimensions, not just diameters.

    Creo 2.0 M110

    José

    Rule Editor_1.jpgRule Editor_2.jpg

    23-Emerald IV
    August 13, 2015

    Not easily, and not without advance planning.  If this is a model that you have full control over and want to build automation into, then yes.  If you simply want to open anyone's model, locate fasteners by size, and create a rule to suppress, then no.

    • Pro-Program works fine to suppress and resume things, but you have to manually create the logical statements to do so in advance.
    • Rules can be created to find certain types of objects, but to the best of my knowledge Pro-Program cannot make decisions based on them.


    Here are the steps to automate with Pro-Program:

    1. Create a parameter to represent your minimum hole size.  ex. MIN_SIZE
    2. Edit Pro-Program
      1. Add an IF statement before each hole feature based on the parameter and the hole's dimension.
      2. Add an END IF after each ADD/END ADD block.
      3. Save the Program
    3. Control which holes are suppressed by editing the value of MIN_SIZE (and regenerating).

    Example (d18 is the hole diameter):

    IF D18 > MIN_SIZE

        ADD FEATURE (XXX)

        .....

       END ADD

    END IF