Hello,
what does this codeblock do? it is a dictionary? or a “if” condition? do i merge lists?
L1<=3? L1:L2;
L1==3? L1:L2;
L1==""? L1:L2;
L1!=""? L1:L2;
KR
Andreas
Hello,
what does this codeblock do? it is a dictionary? or a “if” condition? do i merge lists?
L1<=3? L1:L2;
L1==3? L1:L2;
L1==""? L1:L2;
L1!=""? L1:L2;
KR
Andreas
That Code Block contains four standalone if-statements, nothing more.
Hello, I saw a few days ago
Cordially
christian.stan
Thats the ternary
form of an if-condition. Nearly all programming languages do have this short form of an if-condition.
Some trivia: I use Revit 2019 (due to work) and I noticed that if you use the ternary form you have to be aware of this:
If your true-value or false-value can be null it won’t work, eventhough if the condition is chosen in a way that it only would output the value that is not null. Its like dynamo wants so be prepared for both cases and therefore checks both values to be not null.
Workaround:
I don’t know if this problem still occurs in newer version of Revit.