Proe Function / Relation to round the decimal places
Its strange that ProE does not have a ROUND function. At least I counldnt find it.
It has two funtions.
Ceil will always round it up.
Floor will always round it down.
I have used both to get the ROUND functionality.
here is the relation...
X is the original value.
D is the number of decimal places.
X_New is the rounded value.
X = 1.334
D = 2
X_ = X * 10^D
XFLOOR_ = FLOOR(X,D) *10^D
IF X_ - XFLOOR_ < 0.5
X_NEW = FLOOR(X,D)
ELSE
X_NEW = CEIL(X,D)
ENDIF
try and let me know if it works.
It has two funtions.
Ceil will always round it up.
Floor will always round it down.
I have used both to get the ROUND functionality.
here is the relation...
X is the original value.
D is the number of decimal places.
X_New is the rounded value.
X = 1.334
D = 2
X_ = X * 10^D
XFLOOR_ = FLOOR(X,D) *10^D
IF X_ - XFLOOR_ < 0.5
X_NEW = FLOOR(X,D)
ELSE
X_NEW = CEIL(X,D)
ENDIF
try and let me know if it works.
Comments
I am trying to insert a counter sink angle dimension into the same dimension as the hole. I am successful with the following,
3X dia_sym @D
c'sink_sym dia_sym &d68 X &angle
where "d68" is the diameter of the counter sink and "angle" is the relation "angle=2*d69". d69 is half angle of the countersink - and this is because the hole sketcher only allows for dimensioning between the centerline and the edge of the countersink.
The problem is that I want the "angle" dimension to be 82 and not 82.000. I tried both of your tricks and even if I use &X_NEW in the dimension it still comes out 82.000.
Suggestions?
Jeff
ADS
please add an if condition to the logic of adding 0.5.