I’m writing a student paper and I’m new to Dynamo and Revit (or programming at all).
I hav a model in Revit (a substructure of an offshore wind turbine) and data from structure monitoring in Excel. My task is to import and edit the data via Dynamo and connect them with the Revit model.
I have defined limit values for the data. For example the data has a range of 10, my limits are 3 and 7.
For Data (for example data of the bottom tower) between 3 and 7 the bottom of the tower in my Revit model changes the color to green. If the data is less than 3 or more than 7 it should change the color to red. I did this with the logical operators and it works (see the picture)
You should probably (also) explain that “&&” is a logic AND
It means that for the statement: condition1 && condition2 requires that both conditions are true, otherwise it’s false.
@debranox For future reference, you may need to be careful with the ScopeIf - this node can cause problems/crashes if used improperly. Better to use the regular If
The downside of that the latter is that it evaluates both branches regardless of the input but in a case like this that should be no issue.
Thanks for the code mellouze. That sounds very logical to me and was also about the idea you I had.
But it still doesn’t work properly. The component is always shown in green, no matter how I choose x. I have tested different variants but it doesn’t make any sense to me. If for example I connect color 1,2,3 only with red it still shows green
It was similar with the if node. The result was also different than I expected. So I took the scope if, because it worked right.
Actually I wanted the color of the component to be changed directly in the return command. But then I had the idea to get the color as output and to connect it with the element.overwrite node. Then I came to the conclusion that I can do the same with the other code as well. So it first didn’t worked as expected because I conncted the nodes wrong