Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Round up to the next whole number

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
AMN3161
1211 Views, 3 Replies

Round up to the next whole number

How would I have logic take a decimal number and round it up to the next whole number

3 REPLIES 3
Message 2 of 4
blandb
in reply to: AMN3161

To always round up you can use the Ceil() function. Ceil(60/24) = 3.     60/24 = 2.5

Autodesk Certified Professional
Message 3 of 4
dutt.thakar
in reply to: AMN3161

@AMN3161 

 

You can do that without iLogic also if you are trying to do it in parameters. See below link which describes various functions that parameters can support,

 

In a nutshell, Ceil (Roundup), Floor(round down), and Round(To nearest value, either up or down)

 

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014...

 

 

If you are thinking to go only the iLogic way, you can go to snippets and check the "Math" group, where you will find all the different functions that can be used. see the below snap for more details.

 

Math.PNG

 

 

 

 

 

 

 

 

If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!


Regards,
Dutt Thakar
LinkedIn
Message 4 of 4
AMN3161
in reply to: dutt.thakar

wow, you would think i would of checked in there....

 

thank you

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

Post to forums  

Autodesk Design & Make Report