Skip to main content
1-Visitor
November 15, 2019
Solved

Relation to control min/max of flexible part

  • November 15, 2019
  • 2 replies
  • 4449 views

Hello all,

 

I have been out of the Creo world for about 5 years and have recently been sucked back in (away from CAD).

 

I am building a strut assembly for use as a library part.  I have my family table built as well as all the relations written for dimension control other than the min/max I am struggling to figure out.  Because this is a library part that could be used across multiple projects (and for BOM purposes) I did not use mechanisms and instead made it a flexible part.

 

The strut assembly has an extension rod that gets cut to size on site, but has a min/max based on the strut model you purchase.  There are 11 different strut options, each with a separate min/max range (listed below):

 

Size A - 9.625 to 53.125

Size B - 10.125 to 99.125

Size C - 10.125 to 111.125

Size 1 - 11.375 to 110.375

Size 2 - 11.375 to 110

Size 3 - 11.375 to 108.5

Size 4 - 13 to 108

Size 5 - 13 to 106.5

Size 6 - 13 to 104.75

Size 7 - 15 to 102.5

Size 8 - 17.25 to 98

 

Because the width of said rod is different per instance, my thought was I could write some form of an IF/THEN statement where it would see the diameter of said extension rod and keep the flexible part locked between those value ranges associated.

 

Something along the lines of:

 

IF <extension rod diameter dimension> = <size a dimension>

THEN <min/max from size a>

....

And so on

 

 

Does anyone with more knowledge that a washed up Creo guy have some guidance for me?

 

 

Thanks all!

 

Mike

Best answer by TomU

From the description it sounds like you are flexing a dimension in the extension rod.  Yes, it is entirely possible to have relations limiting a dimension value.  Making a dimension flexible will not allow it to exceed its relation controlled values.  For example, in the model do something like this:

 

IF MODEL == "A"
 IF ROD_LENGTH < 9.625
 ROD_LENGTH = 9.625
 ENDIF
 IF ROD_LENGTH > 53.125
 ROD_LENGTH = 53.125
 ENDIF
ENDIF

IF MODEL == "B"
 IF ROD_LENGTH < 10.125
 ROD_LENGTH = 10.125
 ENDIF
 IF ROD_LENGTH > 99.125
 ROD_LENGTH = 99.125
 ENDIF
ENDIF

...

 

When you flex the ROD_LENGTH dimension in the assembly, regardless of what value is entered, the relations will force the dimension to stay within in the allowed range.

2 replies

23-Emerald III
November 15, 2019

I'm not using a family table but I am using a flexible dimension to control the length range of an assembly.

I suppose you could simply add in a parameter for diameter along with the length.

 

/* DIMENSION NAMED LENGTH
length=D44

/* generate error message
LENGTH >= 24
LENGTH <= 36

/* makes overall length dimension back to max for this dash number
IF D44 < 24
D44 = 24
endif
IF D44 > 36
D44 = 36
ENDIF

TomU23-Emerald IVAnswer
23-Emerald IV
November 15, 2019

From the description it sounds like you are flexing a dimension in the extension rod.  Yes, it is entirely possible to have relations limiting a dimension value.  Making a dimension flexible will not allow it to exceed its relation controlled values.  For example, in the model do something like this:

 

IF MODEL == "A"
 IF ROD_LENGTH < 9.625
 ROD_LENGTH = 9.625
 ENDIF
 IF ROD_LENGTH > 53.125
 ROD_LENGTH = 53.125
 ENDIF
ENDIF

IF MODEL == "B"
 IF ROD_LENGTH < 10.125
 ROD_LENGTH = 10.125
 ENDIF
 IF ROD_LENGTH > 99.125
 ROD_LENGTH = 99.125
 ENDIF
ENDIF

...

 

When you flex the ROD_LENGTH dimension in the assembly, regardless of what value is entered, the relations will force the dimension to stay within in the allowed range.

1-Visitor
November 15, 2019

So if I understand correctly, based on my naming convention "SWAY_STRUT_A.prt , SWAY_STRUT_B.prt" and so on.

 

I would replace to read:

 

IF MODEL == "SWAY_STRUT_A"

 

 

correct?

23-Emerald IV
November 15, 2019

I would suggest creating an extra parameter in part you want to control the length of called STRUT_MODEL (or something like that.)  Add this parameter to your family table and then set it with some value you can use to indicate which model this part is going to be used in.  I wouldn't try to rely directly on the other assembly model's names.  You don't want this to break if the assembly is duplicated or renamed.