Project data & BIM
About BIM-based management of attributes, schedules, templates, favorites, hotlinks, projects in general, quality assurance, etc.
SOLVED!

Option set

kjell syryn
Booster

Is it possible to add a value of a expression to a option set?

 

for example: 

In my expression i multiplied 2 number with each other (3,6 x 10 = 36). In my option set i have the values of 10-20-30-40-50-60-70-80-90-100. I want to have the value of 36 in my option set. Is there any possibility to make this happen?  

2 ACCEPTED SOLUTIONS

Accepted Solutions
Solution

Sorry, this post got marked automatically as spam because of the code.

I have now released it.

 

Feel free to spread the expression out a bit in the editor - it will still work.

If that first expression works, then it should be a matter of just doing this (I hope).

I have marked what I think you need to change in red....

 

IFS (

{Property:Zone/Zone Category} = "Toevoer Slaapkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} ) )

,

{Property:Zone/Zone Category} = "new_zone"; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} <= 10; 10; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} >= 90; 90; {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} ) )

,

{Property:Zone/Zone Category} = "new_zone"; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} <= 10; 10; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} >= 90; 90; {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} ) )

)

 

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

Solution

Here you can find the solution for setting a specific min/max to your zone category.

 

kjellsyryn_0-1684227280890.png

 

IFS ( {Property:Zone/Zone Category} = "Toevoer Slaapkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Toevoer Woonkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 75; 75; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 150; 150; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Toevoer Studeerkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Toevoer Speelkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Afvoer Keuken"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 50; 50; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Afvoer Badkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 50; 50; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Afvoer Was- en droogplaats"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 50; 50; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Afvoer open keuken"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 75; 75; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );

{Property:Zone/Zone Category} = "Afvoer WC"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 25; 25; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) ) )

 

View solution in original post

15 REPLIES 15
Barry Kelly
Moderator

I am a little bit confused as expressions can't have an option set.

So I am not sure what they have to do with each other.

 

In the option set property, you can press the 'Options Setup' button and "Add' more options.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Dear Barry Kelly

 

This expression changes for every zone i place and is different for every zone category. For zone 1 its 3,6 x 15,9 = 57,24. For zone 2 its 3,6 x 20,75 = 74,4. For zone 3 its 3,6 x 2 = 7,2. For some zone categories there is a minimum 10 or 30 and for others there is a maximum 50 or 80. There for i need to put that expression equation in my option set.

 

Kjell.

I am still not clear on what you want.

An expression is a calculation, you have no option for the outcome.

It is what ever the calculation is.

For example calculating the area of a zone.

 

An option set is where you can choose from a possible list of outcomes.

There are no calculations involved, you simply choose the result you want to use.

 

BarryKelly_1-1684138581492.png

 

With zone categories, this is something you set up and then choose the category as you place the zone.

Are you saying you want the category to be chosen based on the area of the zone?

If so, you could create an expression that could tell you what the category should be based on min/max areas, but I believe you would have to manually adjust the actual zone category yourself.

So if you are talking about this zone category (this is from version 22 - all I have open at the moment) ...

 

BarryKelly_0-1684138348392.png

 

I am not aware of any way you can automate which category is used.

 

Barry.

 

 

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Dear Barry Kelly

 

How can you make a expression for 20 different zone categories to have each a different min/max value?

 

Example:

Zone category 1 has a min of 20 and a max of 80

Zone category 2 has a min of 15 and a max of 90

Zone category 3 has a min of 5 and a max of 50

and so on


@kjell syryn wrote:

How can you make a expression for 20 different zone categories to have each a different min/max value?


If the zone categories all have overlapping ranges, you can't.

In your example, if you have a zone area of 40, it could be zone category 1, 2 or 3.

You need precise rules to make a determination.

How would you choose this zone category manually if you had an area of 40?

 

However, if you are manually choosing the category you want, then maybe you could create an expression that checks if it belongs in the range of areas.

You could then set up a sequence of expressions that it would run through to check if it was valid or not.

I can't say what the exact format of the expressions would be (without setting it all up myself), but it would be something like ...

 

If zone category = "zone category 1" then if within a range of 20-80, the result is "OK"

If zone category = "zone category 2" then if within a range of 15-90, the result is "OK"

If zone category = "zone category 3" then if within a range of 5-50, the result is "OK"

 

The expressions will get messy though as you can't mix strings (zone category name) with numbers or areas.

I just had a quick play and couldn't get it to work.

I will try again later and if I get a result I will post back.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

I thought it would be easier to use a sequence of expressions.

But I couldn't get it to work.

Maybe it doesn't work with IF because if it is true, that is it and if it is false it does not go to the next expression in the sequence.

 

But I managed to do it with a nested IFS.

 

BarryKelly_0-1684160672328.png

 

This is the text for the formula I used ...

 

IFS ( AND ( {Property:Zone/Zone Category} = "Category 1", {Property:Zone/Measured Area} >= 20 m2, {Property:Zone/Measured Area} <= 80 m2 ), " CAT 1 OK", AND ( {Property:Zone/Zone Category} = "Category 2", {Property:Zone/Measured Area} >= 15 m2, {Property:Zone/Measured Area} <= 90 m2 ), " CAT 2 OK", AND ( {Property:Zone/Zone Category} = "Category 3", {Property:Zone/Measured Area} >= 5 m2, {Property:Zone/Measured Area} <= 50 m2 ), " CAT 3 OK" )

 

Change the names of the zone categories to suit yours and you can change the "OK" response as well.

This will just give you a property value to say if the zone area meets your particular category requirements.

You can add more categories, at the end before the final bracket just keep adding this but change to your next category and min/max areas...

 

AND ( {Property:Zone/Zone Category} = "Category 1", {Property:Zone/Measured Area} >= 20 m2, {Property:Zone/Measured Area} <= 80 m2 ), " CAT 1 OK"

 

I hope this is what you are after.

You still have to place the zone with the category you want, but the property will tell you if it is OK.

 

BarryKelly_1-1684161356217.png

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Dear Barry Kelly 

I want to thank you for the time and energy you put in to this. This is very helpful. This is not exactly what i need but its close. For my project the value needs to recalculate to the min/max.  Also i need to put these in a schedule. 

 

IFS ( {Property:Zone/Zone Category} = "Toevoer Slaapkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} ) ) )

 

This is the expression i use. This only works for 1 Zone Category. If i want to add a other zone category it gives me a error. The 10 zone categories all got a different min and max. Is there any possibility to add more zone categories?

Dear Barry Kelly 

 

I want to thank you for the time and energy you put in to this. This is very helpful. This is not exactly what i need but its close. For my project the value needs to recalculate to the min/max.  Also i need to put these in a schedule. 

 

kjellsyryn_0-1684180868314.png

 

 

This is the expression i use. This only works for 1 Zone Category. If i want to add a other zone category it gives me a error. The 10 zone categories all got a different min and max. Is there any possibility to add more zone categories?

I have just started work for the day so I won't get to play around with this and test it until later tonight (about 10 or 12 hours from the time of this post).

But it should just be a case of adding an extra argument, exactly the same format as you have but with the next zone requirements.

 

BarryKelly_0-1684199320268.png

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11