I edited the color scheme and when I chose my_scheme_text_string, the red automatically filled in the first line. I did the other two lines with green and blue. Thus, all my rooms became red.
Thanks for your help bvs1982, but as I mentioned in the first post I don’t know anything about Dynamo. So I have no idea where to put your code. I don’t know where the statement is and how to reconnect everything.
The Required Area parameter is fed by the ‘‘Area comparasion’’ schedule, as you can see in the first post.
I asked for this code on this forum because I thought it would be something easy. However, I am now clearly realizing that, for my stupidity, this is rocket science, and I don’t know how to follow your advice.
Now we are getting somewhere.
Your Required FieldParameter still
has no value.
So you are testing a value to a no (empty) value
in the, now correct, Code Block.
Forget Dynamo for a moment. Dynamo is just a way to automate values. You need to understand your process first.
You’re very close here. Value ranges don’t allow for exact values (ex: x = 0) so you have to give a little tolerance. In my scheme the middle range is actual 0 - 0.001 with the values formatted to two digits therefore showing 0-0. It’s just a small workaround. The parameter should also be the parameter associated with the difference in areas - not a color you want to show. Your view will then color each room based on which range the parameter value falls under.
All your values for “Required Area” are empty. Therefore nothing meets your conditional. Using a string value is an option but I highly recommend just doing the math and writing the actual value to the parameter. The Color Scheme conditions will handle the logic there. It also means you can compare actual values in the schedule rather than a color.
With a Required Area parameter and an Actual Area parameter already filled out, all that’s necessary is a Area Difference parameter. It’s the exact same situation as the calculated field and conditional formatting in the schedule. The only difference is that schedule formatting only allows one override and calculated fields are only available in the schedule (therefore can’t be used for view filters). The third parameter, Area Difference, is to replace the calculated field outside of the schedule. The Color Scheme just allows you to filter and assign color overrides to rooms based on the value of Area Difference. The additional benefit of leaving the value as a number is that you can schedule it against the automatic calculated field to see when model changes have left your value out of date.
@Nick_Boyts
My brain is a bit fried for the week
(was a long one for me) .
I only knew for a fact the statement
in his Code Block was wrong
(which people didn’t notice?).
I hope i didn’t add more confusion.
This will return a true or false value based on if the item at the matching level of list A[0] being than the equivalent in A[1].
Pretty sure that each of these return the same sequence of booleans for the same nested list A: A[1]>A[0]; A[0]<A[1]; A[0]-A[1] <0; A[1]>A[0] ? true : false; A[0]<A[1] ? true : false; A[0]-A[1] <0 ? true : false;
The code block conditional was actually fine. You don’t need to specify the “if, else” part of a conditional returning a boolean. That’s already what the conditional is doing. The issue was the empty values from the second parameter.
That’s the Dynamo part. The calculated field can’t be used outside the schedule so you’re creating a project parameter that can hold the same information. It just has to be manually filled in. Using Dynamo however, you can automate the calculation and update the parameter value.