Inventor IdeaStation
Share your ideas about how to improve Inventor with the Development Team.

## Improved round() function

Status: New Idea
by on ‎04-10-2013 05:07 PM

Improved behaviour & functionality of "round", "roundup","rounddown" functions. round() does not work in a parameter list because it expects something unitless. The only solution appears to be to create several user parameters for each step. i.e this is what my user parameters are like:

p1(in)=round(value/ 1 in)*1in

if I use isolate as suggested by someone else I only could get it working with extra parameters:
p1(in)=Value
p2(ul)=round(isolate(p1;in;ul))
p3(in)=p2*1 in

It's messy, hard to read, east to make mistakes in a large formula.

Round also does not allow you to choose # of decimal places to round to. The above method can be modified for this case as well, but it would be much easier if round allowed more inputs: For example:

round(Value;unit to round in;position from decimal to round at)
round(12.3456 in; in; -1) = 12.3 in
or
round(12.3456 in;mm;-1)= 313.6 mm

or

round(12.3456 in;in;1)= 10 in

round(12.3456 in;in;0)= 12 in

round(12.3456 in;in)= 12 in

round(12.3456 in)= 12 in

by on ‎04-15-2013 12:42 PM

Not that this is really a solution for you, but iLogic's round functions are much more versatile. Perhaps you could employ them to help?

I prefer to write any complex formula in an iLogic rule, myself.

by on ‎04-15-2013 01:21 PM

Thanks for the tip.  I don't use iLogic much (and it would be nice to have an improved function anyway), but I'll keep it in mind for the complex stuff.

Announcements
IdeaStation Guidelines
Review guidelines and best practices
before posting a new idea.
Latest Ideas
Top Tags
Completed Ideas