Skip to main content
1-Visitor
February 11, 2022
Solved

amount of holes by length of profile with parameters

  • February 11, 2022
  • 2 replies
  • 2092 views

I have a U profile that I control with parameters.


There are 2 holes in this profile, if the length is 1000mm. If the profile is bigger than 1000mm, then I want to have 4 or more holes in the profile.

Can this be set parametrically with Creo 7?


How do I do this ?

Thanks in advance for your suggestions!

Best answer by tbraxton

If you are asking how to vary the number of holes in a part based on the length of the part, then you can do it with conditional statements in the relations. Put a conditional test in the relations for the length and then adjust the number of holes as required.

 

The pseudo code would look something like this.

 

If length <= X

then # of holes =H1

else 

   If length >X

   then # of holes = Y

endif

 

See this for reference:

https://support.ptc.com/help/creo/creo_pma/usascii/index.html#page/fundamentals/fundamentals/fund_seven_sub/Conditional_Statements_in_Relations.html 

 

Another option is to use Pro/Program which can pause for user interaction if desired to deal with this.

2 replies

tbraxton
22-Sapphire II
tbraxton22-Sapphire IIAnswer
22-Sapphire II
February 11, 2022

If you are asking how to vary the number of holes in a part based on the length of the part, then you can do it with conditional statements in the relations. Put a conditional test in the relations for the length and then adjust the number of holes as required.

 

The pseudo code would look something like this.

 

If length <= X

then # of holes =H1

else 

   If length >X

   then # of holes = Y

endif

 

See this for reference:

https://support.ptc.com/help/creo/creo_pma/usascii/index.html#page/fundamentals/fundamentals/fund_seven_sub/Conditional_Statements_in_Relations.html 

 

Another option is to use Pro/Program which can pause for user interaction if desired to deal with this.

24-Ruby III
February 14, 2022

Hi,

unzip uploaded file and open example.prt. Then change part length from 200 to 300 (for example) and regenerate. Then investigate relations.