Round up an Attribute

Round up an Attribute

Anonymous
Not applicable
2,511 Views
4 Replies
Message 1 of 5

Round up an Attribute

Anonymous
Not applicable

I am using an attribute to display a design temperature in a block. I would like another attribute to display this same value rounded up to the nearest whole number.

 

I have played around with constrained parameters and using the ceil() function without much success. Any suggestions?

Accepted solutions (1)
2,512 Views
4 Replies
Replies (4)
Message 2 of 5

3wood
Advisor
Advisor

I think you can use FIELD in the attribute.

See attached example drawing.

0 Likes
Message 3 of 5

Libbya
Mentor
Mentor

Yes, a formula field.  If memory serves |[att value]+0.5|.

0 Likes
Message 4 of 5

Libbya
Mentor
Mentor
Accepted solution

See the attached file.  I set the default value of the top attribute to 10 and then addede the formula field to the default value of the bottom attribute.  In the formula field I inserted an object field referencing the value of the first attribute and then added 0.49999 to it.  The result is that it will round UP to the next whole number as shown.  If a new insertion of the block is created, it will need to be jumpstarted to get the field to update on regen.  To jumpstart the block click the move grip and select a point.  It can be the same location but you need to make a dynamic action in order for the field to work.   

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thanks!

0 Likes