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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Way to round of the value in the relation formula?

mgupta-4
1-Newbie

Way to round of the value in the relation formula?

Dear All,

 

Is that any way to make the answer round off after calculating by the formula used :

 

See the attached formula ,in this formula the value came like 915.12 and in next part 915.22 ,so that in the BOM its saying as two parts with same part no.

 

Please suggest.

 

 

Mainsh


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

What do you want to round to? The nearest integer? If thats the case you can use the functions floor() or ceil() to round up or down to the nearest integer.

Dear Andy,

How to Use this while writing the relation.

Let say ,i have the formula :

L=d1,

and i want its no decimal value.

another

L1=d3

and its upto 3 decimal value .

How to do all this.

Manish

Document - CS46567


Document Information

TypeArticle
Date Created02-Feb-2012 18:05:11 EST
Date Last Updated07-Apr-2013 22:05:49 EDT


Document Details

TitleHow to use round function in Pro/ENGINEER, Creo Elements/Pro and Creo Parametric
DescriptionHow to use round function
Applies To
  • Pro/ENGINEER Wildfire 2.0 - 5.0 all datecodes
  • Creo Elements/Pro 5.0 all datecodes
  • Creo Parametric 1.0 - 2.0 all datecodes
Cause
Resolution
  • There is no direct function for round in relation than floor() and ceil().
  • To get mathematical round use one of the following formulas
    • no decimal place: A=floor(B+0.5) or A=ceil(B-0.4)
    • one decimal place: A=floor(B*10+0.5)/10 or A=ceil(B*10-0.4)/10
    • two decimal places: A=floor(B*100+0.5)/100 or A=ceil(B*100-0.4)/100
  • Refer to About Functions Used in Relations and Specifying the Number of Decimal Places
Top Tags