Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

conditional statement problem

17 ANTWORTEN 17
GELÖST
Antworten
Nachricht 1 von 18
Anonymous
1597 Aufrufe, 17 Antworten

conditional statement problem

Hi there....

There is something that looks a little bit nonsense in my area schedule.

 

I am scheduling different type of units such as flat, maisonette and multi-storey house. Since either maisonette and house areas are spread on different levels I've created a formula to calculate the total number of units correctly. i.e. a duplex has a total area which is the sum of the two areas on two different floors and so, needs to be counted as 1 (area) instead of 2.

 

I've assigned a value equal to the number of levels the area is spread on and then make the grand total.

 

Here the formula: if(LEVEL=3,1/3,if(LEVEL=2,1/2,if(LEVEL=1,1,0))).

Where LEVEL is an input assigned to each area.

 

Then, I want to calculate the total number of RENTED units and I did the same process, but this time I combine a RENTED VALUE created like LEVEL.

 

Here the weird thing, as I attached, the values per row are correct only if I don't make any calculation at the bottom. As soon as I calculate the total all value would change.

 

Any idea about what I am doing wrong?

 

Many thanks

17 ANTWORTEN 17
Nachricht 2 von 18
ToanDN
als Antwort auf: Anonymous


@Anonymous wrote:

Hi there....

There is something that looks a little bit nonsense in my area schedule.

 

I am scheduling different type of units such as flat, maisonette and multi-storey house. Since either maisonette and house areas are spread on different levels I've created a formula to calculate the total number of units correctly. i.e. a duplex has a total area which is the sum of the two areas on two different floors and so, needs to be counted as 1 (area) instead of 2.

 

Why don't you use Unit Name or Number assigned to Areas to count the units?  If you do that, it doesn't matter if an unit's areas spread on different levels, they are still identified as one unit.

 

 

I've assigned a value equal to the number of levels the area is spread on and then make the grand total.

 

Here the formula: if(LEVEL=3,1/3,if(LEVEL=2,1/2,if(LEVEL=1,1,0))).

Where LEVEL is an input assigned to each area.

 

Then, I want to calculate the total number of RENTED units and I did the same process, but this time I combine a RENTED VALUE created like LEVEL.

 

Here the weird thing, as I attached, the values per row are correct only if I don't make any calculation at the bottom. As soon as I calculate the total all value would change.

 

Any idea about what I am doing wrong?

 

Many thanks


 

Nachricht 3 von 18
Anonymous
als Antwort auf: ToanDN

Why don't you use Unit Name or Number assigned to Areas to count the units?  If you do that, it doesn't matter if an unit's areas spread on different levels, they are still identified as one unit.

 

Names are already assigned to areas. But Revit doesn't calculate total name. In addition, that wouldn't solve the issue when I need to pick up information whichever unit's information and the relative unit to make a total. Does it make sense?

 

As I showed, it looks particularly odd that the calculation changes as soon as I make a total of the source.

Nachricht 4 von 18
ToanDN
als Antwort auf: Anonymous

Not sure why your formula is so complicated.  It can be as simple as below:

 

Capture.PNG

Nachricht 5 von 18
Anonymous
als Antwort auf: ToanDN

I would just say that your formula is more clever than mine.Smiley (zwinkernd)

 

Apart from that, I've tried your formula but the problem is still there. If you make a total from your UNIT COUNT's column the total would be wrong.

Perhaps, I haven't explained my problem well. The trouble is about making total, not the formula itself...

 

Many thanks

 

Nachricht 6 von 18
ToanDN
als Antwort auf: Anonymous

The reason is when you enter the Number of Level for a grouped Unit, you actually enter the value for all the rows of that Unit.  So when you calculate total, the value is not the same.  I will get back to this later.

 

Capture.PNG

Nachricht 7 von 18
ToanDN
als Antwort auf: Anonymous

Here is another approach.  See the attached 2017 Revit file for formulas and settings.

 

Capture.PNG

Nachricht 8 von 18
Anonymous
als Antwort auf: ToanDN

ToanDN, thanks so much for explaining.

 

I've attached two grand total calculations. The first one uses a formula I had set up before consulting the forum, the second one uses the one you suggested. When I select calculate totals the first one gives me the correct total whereas the second count each item as you said and so the total is wrong.

 

Sorry for bothering you, but I can understand why the first one works and the second doesn't.

 

Thanks in advance

 

 

Nachricht 9 von 18
ToanDN
als Antwort auf: Anonymous

Same explanation as above. If you set the schedule to itemized every row you will understand. Nonetheless, i have change my suggestion to a different approach.
Nachricht 10 von 18
Anonymous
als Antwort auf: ToanDN

Thanks for that....it'd take me a little bit more to understand it anyway.

Frustrierte Smiley

Nachricht 11 von 18
ToanDN
als Antwort auf: Anonymous

So you last example works, how come the one you posted initially did not?

Nachricht 12 von 18
Anonymous
als Antwort auf: ToanDN

I've no idea, that's the thing!

I thought it was something like "Revit doesn't allow to make a calculation from another calculation"...I'll have a look at my massive schedule and get back to you.

 

Many thanks for now

Nachricht 13 von 18
ToanDN
als Antwort auf: Anonymous

I think if you itemize every row, enter 1 as the number of Level for every row, then un-itemize, the total count will be correct with your formula.

 

See attached screenshots and Revit file:

 

Capture.PNGCapture1.PNGCapture2.PNGCapture3.PNG

Nachricht 14 von 18
FAIR59
als Antwort auf: ToanDN

I would suggest an alternative approach:

Use a yes/no parameter to indicate the main entrance level (only 1 for each unit) and use a formula to convert it into 0 or 1 for the unit count.

 

UnitCount1.PNG

 

and  in the schedule you can use the Count parameter to get the number of internal levels per unit:

 

UnitCount2.PNGUnitCount3.PNGUnitCount4.PNG

 

Nachricht 15 von 18
Anonymous
als Antwort auf: FAIR59

That sounds great, thanks so much!

 

it would possibly work around the calculation problem.

However, I am just wondering whether, working as a team, it may be a bit confusing. (i.e. everybody needs to know that only one of the area would be included in the schedule and be careful when create/delete them).

 

I am about to create a template with a default schedule to avoid all these problems. By the way, that is a great shout!

 

Going back to the previous suggestions, yesterday I tried again the others solutions and sometimes was fine sometimes it wasn't. I start thinking that there would be a sort of bug in Revit 2017

 

Many thanks 

Nachricht 16 von 18
FAIR59
als Antwort auf: Anonymous

all the areas will be included in the schedule. Users have to check the IsMainEntranceLevel parameter for 1 area per Unit, and uncheck the others. 

Nachricht 17 von 18
ToanDN
als Antwort auf: Anonymous

I added the Count field to the schedule (thanks to @FAIR59 suggestion), set it to Not calculate total, then the whole thing works as you asked without having a Yes/No parameter.  The total units are correct, the levels per unit are correct, the areas are correct.

 

Capture.PNG

 

 

 

 

Nachricht 18 von 18
Anonymous
als Antwort auf: ToanDN

Brilliant, it looks great!

Many thanks for your help

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report