Rounding Up in Dynamo

I’m trying to round occupancy loads up to the nearest decimal…I have downloaded the clockwork add in and there is a function called ‘Math.RoundUpToPrecision’. I’m not sure how to use it. Please see screen shot below for script. Thanks

Update: I figured it out.

I think you also have a problem with null values… try to use ‘list.clean’

Hi @erfajo

He already figured out :slight_smile:

Looks like it, but without explaining how he solved his problem, nobody can learn anything from his question. Here is therefore a possible solution for the readers of the post :slight_smile:

I still think he also have a null value problem :wink:
So for cleaning unplaced areas…


Here is the final result…there are some null values but that’s because there are unplaced areas in the model. See below:

Hello everybody.

  1. I’m trying to figure out where to put Math function that I wont get yellow warning (I’ve tried everything).

  1. How to round from number 38 or 39 etc to 40. In excel it would look like this --> =round(cell;-1). Can I use the same formula in code block?

What I’m trying to is to combine two parameters in one column and to round them to closest number 30, 45 and 90.
P.e If the number is 25 then round it to 30. If 38 the round it to 45, if 89 then to 90.

Any ideas?


I bet there is a better way but never the less.