cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Improved round() function

Improved round() function

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

 

 

 

4 Comments
mrattray
Advisor

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.

ihiengdept
Enthusiast

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.

inv.ideareview
Autodesk
Thanks for sharing your Idea. We use this forum to guide product development and help users in the best way we can based on voting. We occasionally merge Ideas or archive old ones to keep the forum working properly- it ensures there is room for people to review new Ideas and that the most relevant and meaningful ones can gain votes. We’re archiving this Idea because it's been on the board for well over a year and hasn't received many votes from the community. If you want to raise it again and try to gain more support, you're welcome to do so. We’ve found that pictures and mock-ups can help get concepts across and win more votes from other users. If you have questions or see a connection between this Idea and others, let us know. - Inventor product team (Inv.idea review)
inv.ideareview
Autodesk
Status changed to: Archived
 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea