Skip to main content
15-Moonstone
November 4, 2019
Solved

Add part if condition is met

  • November 4, 2019
  • 1 reply
  • 1414 views

Hi,

 

I have an assembly that contains aluminium-Profiles.

If the profiles exceed a length of (lets say 1500mm) then other profiles have to be added to the assembly to increase stability.

 

So maybe something like that is possible:

 

if(length of dimension  > 1500) 

 then add/ the profiles/parts to reinforce the construction

 

 

How can something like that be done ?

 

Thanks,

Maik

 

 

 

Best answer by avero

You will probably need to create a parameter that is connected to the length so you can use the parameter in Model Intent -> Program to enable/disable parts. In Relations you'll type Dxxx=ParameterName to connect the Dxxx value that Creo automatically generates for every dimension to the parameter that you have created. In Pro/Program you will simply need to add IF ParameterName>1500 in front of the "add part coding" that Creo automatically generates and then an END IF after the part has been added (after END ADD, which Creo automatically generates). Are you familiar with parameters, relations and program?

1 reply

avero1-VisitorAnswer
1-Visitor
November 5, 2019

You will probably need to create a parameter that is connected to the length so you can use the parameter in Model Intent -> Program to enable/disable parts. In Relations you'll type Dxxx=ParameterName to connect the Dxxx value that Creo automatically generates for every dimension to the parameter that you have created. In Pro/Program you will simply need to add IF ParameterName>1500 in front of the "add part coding" that Creo automatically generates and then an END IF after the part has been added (after END ADD, which Creo automatically generates). Are you familiar with parameters, relations and program?

15-Moonstone
November 6, 2019

Thanks a lot for your help. I'll try it.