Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Feature selection in a relation

23-Emerald II

Feature selection in a relation

I have a family table that I am building of hex head screws. I want to put the material marking on the head and it varies depending on the nominal diameter of the screw. I have created the 2 markings and currently have them added to my family table so a Y or N will select the proper one. Since I have the diameter driving the head in an IF/ENDIF section in the relations, How do I add a feature inside the IF/ENDIF segment for each size.

Something like this:

IF basic =='1/2"

   nominal = .500

   hd_flat = .750

   hd_thk = .375

   fid:head_mark_c = yes

   fid:head_mark_d = no


Is that even possible in a relation or must I move some of this code to Pro/Program? I will probably leave the Y/N columns in the family table if I can't do it in relations.

Creo 2 M240

Windchill 10.0 M040


I have only seen conditional feature suppression done with Program.

23-Emerald IV

You could do this but you would still need to add a Pro/Program statement to suppress this feature based on the parameter value.  I'd suggest you keep the syntax simple and the model more understandable by having the parameter you are switching on and off (and using to drive Pro/Program) be a top level parameter instead of one buried inside the feature.

It's also a little cleaner (in my opinion) to pull the data down to the later feature from inside the later one vs. pushing it down from the earlier one.  This way if you decided to delete the later feature you don't have relations in the earlier feature that will fail.


IF <blah> == <blah>






    MARK_TEXT = HEAD_MARK:FID_Main_Feature


attached model is created in CR2 M070. See relations, pro/program.


Martin Hanák

Hi Martin.


I saw your attached file


And I don't understand...

You create the parameters

Create the relations

But... How it supress the feature when change the dimension D4?

I not see the relation.




I had a need for this since we were using a variety of hex bolt grades, depending on location and function, as one does. I've got a lot of fastener family table parts where I use the geometric definition of the part to create the description that goes in the bill of materials, etc. It makes things very easy if I want to add another size bolt, I don't have to worry about this text stuff as long as I have the geometry right.

Anyway, to do the hex head cap screw grade markings, you'll notice that the standards call for the radial lines to be spaced a certain way, and start at a certain angle. They are all equally spaced, some completely around the bolt center, others for only a certain total angle. My method of doing them was:

(1) Define a first line, located at an angle from the corner.

(2) Pattern this line about the axis of the bolt with an angle and number of lines.

(3) Define a text parameter that specifies the grade of bolt.

(4) In the family table, add a column for the grade, and one for the pattern of lines.

(5) In the relations, assign the starting angle, pitch, and sizing of the lines based upon the bolt size and the grade.

The grade markings are turned on/off by the family table, and geometrically defined by relations. This works out well and it's nice to have the visual display of the bolt in the drawings show me that I've got the right grade of bolt defined for a particular location.

Here's my snippet of relations that do the marking definition:

---- [ Begin Relations ] ----


/* The grade markings are defined based upon the geometric parameters and the grade designation.


diagradeinner = 0.6 * diathread

diagradeouter = 0.9 * sizehex

IF gradedesignation != "<NONE>"

  IF gradedesignation == "5"

    anggradestart = 30.0

    numgrademarks = 3

    anggradeincrement = 120.0


  IF gradedesignation == "5.1"

    anggradestart = 0.0

    numgrademarks = 3

    anggradeincrement = 90.0


  IF gradedesignation == "5.2"

    anggradestart = 30.0

    numgrademarks = 3

    anggradeincrement = 60.0


  IF ( gradedesignation == "7" )

    anggradestart = 45.0

    numgrademarks = 6

    anggradeincrement = 60.0


  IF ( gradedesignation == "8" ) || ( gradedesignation == "BD" )

    anggradestart = 30.0

    numgrademarks = 6

    anggradeincrement = 60.0



---- [ End Relations ] ----

Hope this is helpful.


Did you try simply putting "ADD FEATURE .... " section of already created feature under condition (this is not in relation section, this is inside ProPROGRAM where feature actually resides) ? Like :

IF ABC = ***






in case you have 2 alternate features put them both under alternate conditions, no need to suppress if I am not mistaking.



- Vlad

is possible using proprogram suppres or delete a member of pattern?

I have a parameter that defines the number of the member, the problem is that in some cases it is 1 and the series fails.


is it possible with proprogram to achieve this result without causing a failure?




Top Tags