Getting Dynamo to Add or Subtract from a dimension

I currently am using a dynamo script that is adding dimension heights for me in Revit. I am trying to add on to this to either add or subtract from my given dimension.

Ex. If an object is measuring 38" inches off the floor but I want to get it to subtract 1" to get a result of 37" as my ending answer.

What can I do so dynamo can either add or subtract any given value.

Hi @abrahamg !
You can use a If node.

Hello @Francois_Labonne,
Thank you for your quick response! I notice you have and add and subtract block but can I put a negative value in the number slider to instead say subtract 1 from 10 to end up with 9 as an example. Sorry if I’m missing something I’m fairly new and learning Dynamo still! :slight_smile:

Also to add on to this would I be able to attach the if node to the current script I have

In my example you just have to switch the boolean node to false and the result will be 5.
But you you can too set the range of the slider by opening the left arrow. (in that case you don’t need the if node)

i think it is possible, maybe it depends of your script…share it (screenshot or dyn file) if you need to solve a specic issue.

Actually just plugged it in and got the outcome I was looking for, thank you so much for your help!