Creo Parametric 3.0 Tip - How to Convert a Real Number Parameter to an Integer

Tyler Griffin

By: Tyler Griffin

First, go to Tools>Parameters and create your real number parameter and your integer parameter.  Click on the + to create a new parameter and click on the drop down menu in the type column to set the types. 

1
1

Then specify a value of 1 for the integer parameter.  Close your parameters and open your relations (Tools>Relations).  Type the following:

int = floor(real)

where int is the name of your integer parameter and real is the name of your real number parameter.  If you want the result rounded type this instead:

integer = floor(real + .5)

3

 

Then click ok and regenerate your part.

Once regenerated, open back up your parameters or relations and you will see that your integer parameter is populated as you specified and is still set to the integer type.


3

Previous Article
Leaf Spring Sketch in Creo
Leaf Spring Sketch in Creo

By Nate Frazee When modeling a leaf spring, the length of the spring stays constant, while the radius chang...

Next Video
Customizing the Navigator Panel
Customizing the Navigator Panel

www.Rand3D.com Watch this short 5 minute video on how to create a separate layer tree and detach the model...

×

Sign up for email updates

First Name
Last Name
Country
Thank you!
Error - something went wrong!