PDA

View Full Version : Formula



Kbosch.184344
2008-07-25, 11:08 AM
Hello

I'm trying to customise my schedule the way it only measures area with a height more then 1500mm. Due to the slope roofform I don't want to have the area with a height less then 1500mm in my area totals. I wonder if this is possible with some sort of formula. As there are no tutorials about formula's, I have no idea how to approuch this problem. I've tried many things but I just keep getting error messages like "inconsistent units".

On the picture below you can see my final attempt :/

Scott Womack
2008-07-25, 11:16 AM
Hello

I'm trying to customise my schedule the way it only measures area with a height more then 1500mm. Due to the slope roofform I don't want to have the area with a height less then 1500mm in my area totals. I wonder if this is possible with some sort of formula. As there are no tutorials about formula's, I have no idea how to approuch this problem. I've tried many things but I just keep getting error messages like "inconsistent units".:/

The issue is AREA is a "squared" or special type of unit of measure. Height is a Length. So, as a true condition, you would have to calculate the area again, and then provide a computation to do if the condition is false. Your formula is incomplete. You have a condtion to test against, but what does this do if the Height is Less than 1500mm?

Comach
2008-07-25, 11:39 AM
Hello

I'm trying to customise my schedule the way it only measures area with a height more then 1500mm. Due to the slope roofform I don't want to have the area with a height less then 1500mm in my area totals. I wonder if this is possible with some sort of formula. As there are no tutorials about formula's, I have no idea how to approuch this problem. I've tried many things but I just keep getting error messages like "inconsistent units".

On the picture below you can see my final attempt :/

As Scott mentioned it is dependent on conditional parameters - one way to approach this may be to derive the area but elaborate "WHERE <" something like this:

Area = (X x Y)WHERE Y<1500 or Area = If Y<1500(X x Y) [this says to calculate the area if the value is less than 1500 which needs to followed by 'then otherwise' parameter.]

I am doing this from memory so it may not be quite right, so please only consider this as a suggestion. Those more familiar with this may be able to provide a more exact solution.

Kbosch.184344
2008-07-25, 12:41 PM
Area = (X x Y)WHERE Y<1500 or Area = If Y<1500(X x Y)
That looks sollid, but then what do I fill in for X and Y? Does Revit work with coordinates and if so where can you find them?

Comach
2008-07-25, 02:29 PM
That looks sollid, but then what do I fill in for X and Y? Does Revit work with coordinates and if so where can you find them?

That was just something off the top of my head - you need to work out the formula according to your requirements - not sure if you wanted a flat area or a volume area.

The way it works is the 'IF parameter will determine a condition and if the value corresponds to that condition then it will execute the formula in the brackets, if not then you need to add another condition or formula or value after the brackets.

A good way to devise the formula is to do it in MS Excel with sample values till you get what you want and copy and paste this formula. These variables will be determined by accessible data in Revit which I don't know as I have never used it.

You will find that the formula development in Revit will be typically what you can do in Excel.

Kbosch.184344
2008-07-25, 04:17 PM
Ok, but in Excel everything seems to be so much easier. For example I made an IF formula in Excell that works, but doesn't work in Revit:

IF(A3>B3;"This value is ok";"This value is not ok") Very simple formula that mentions wheter the value in A3 is good or not good.

How would I define this in Revit

If I try to redefine it for Area I'll get error messages:

IF(Area>12;"The space of this room is ok to the law";"The space of this room is not according the law")

Am I allowed to use text in the formula space?

Kbosch.184344
2008-07-25, 05:52 PM
I figured out that you have to use comma's instead of the semicolon's and have to select "text" for type and now it seems to work.. Hurray my first working formula. :D Now I will try to figure out a way to get my desired area.. thanks for your help.

Comach
2008-07-25, 08:50 PM
I figured out that you have to use comma's instead of the semicolon's and have to select "text" for type and now it seems to work.. Hurray my first working formula. :D Now I will try to figure out a way to get my desired area.. thanks for your help.

Well done - I wish you success.

Kbosch.184344
2008-08-13, 10:00 AM
Why doesn't this formula work? I know that the error comes from the first part (Name = "Slaapkamer") , but in Excel this seems to work. I want this Formula to show the Area of that room in my schedule when the name of that room equals "Slaapkamer", otherwise it just puts a "-"..

Edit: btw the area part doesn't exactly do what I want either as it literally puts the text "Area" in the schedule instead of the size of the area. :/

Comach
2008-08-13, 11:09 AM
Why doesn't this formula work? I know that the error comes from the first part (Name = "Slaapkamer") , but in Excel this seems to work. I want this Formula to show the Area of that room in my schedule when the name of that room equals "Slaapkamer", otherwise it just puts a "-"..

Edit: btw the area part doesn't exactly do what I want either as it literally puts the text "Area" in the schedule instead of the size of the area. :/

I don't have Revit and I am working from memory here, so it is difficult to be of further assistance at this time. However I would suspect that you need to declare what 'Name' means - is it a table cell, an attribute or a Revit variable. For the area as a formula in its own right it will need to be contained within its own parenthesis.

Kbosch.184344
2008-08-13, 11:31 AM
I don't have Revit and I am working from memory here, so it is difficult to be of further assistance at this time. However I would suspect that you need to declare what 'Name' means - is it a table cell, an attribute or a Revit variable. . Well for my building I've added the rooms and afterwards gave the rooms a TAG. The Identity data of that TAG contains "Name" and this is what I used in my formula..
With some key schedule or something I want to define the rooms with a function, like Bathroom = bathspace or Hallway = travel space, or Slaapkamer = living space, etc ..
Then I want the Area of the living space in my building to show up and the rest to be ignored with the formula I showed..

Btw because "Name"is a predefined part of "Room" I can't edit it.

It's pretty unclear what in possible with Revit as there are no good tutorial in Revit and it seems that not everything in Excell can be done with Revit. It's pretty complex aswell what I'm trying to reach so if you don't know the awnser it's no big deal...then at least I tried;)

For the area as a formula in its own right it will need to be contained within its own parenthesis. My english is failing here.