We are trying to fill a shared (yes/no) family type parameter if no value to for example ‘yes‘.
It is listing the 3 values in my project as 1, 0 and ‘no value‘ already. And I want to set parameter.
What should be the missing steps, to filter elements with ‘no value‘ and input to set value.
Thanks you for your quick reply, Jacob. My level is novice so i’m probably understanding some wrongly.
Two questions:
I tried ‘List.filterByBoolMask‘ but gives for me unexpected outcome. What should I put in the string to make it filter out ‘1‘, ‘0‘ and leaving ‘no value‘ as output.
For the one wall (element) selected, it gives an warning message.
Maybe due to the fact I’m listing one element to change Family Type parameter.
Would it work if I got all wall selected, or does it require a different setup
List.Contains will tell you if anywhere in the list the object is returned, and then give you a single boolean (true for false).
You likely want to test something like “is the value not equal to 1”, filter out and then set all values (those at 0 or left blank) to 0 (so values already 0 are made zero and values blank are made zero). To test equality, use the equal (==) node. To test inequality use the not equal (!=) node.
Thank you for your reply. First issue is solved, it works when I override with Boolean at ‘Element.SetParameterByName‘ on all elements.
Just trying again but cannot find out how to filter. Any source maybe to check into?
Don’t understand why ‘List.FilterByBoolMask‘ gives always output ‘1‘
How can I filter all elements with the values “not 1“ and feed it into SetParameter to give all element which are ‘no value‘ (and 0) to value 0.
You have a list of values which are either `` (blank), 0, or 1.
You want to test those values for being not equal to 1, using a != node. That will produce a boolean (a true false value) for each parameter value. The ‘true’ values are not 1, the false values are 1.
That list of booleans becomes the ‘mask’ for the List.FilterByBoopMask node. The list input is currently the list of parameter values, but it really wants to be the list of elements which were wired into the parameter value node so fix that as well.
The ‘in’ result of the List.FilterByBoolMask node is the set of all elements which want to have thee value set to 0, so pass those into the Element input of an Element.SetParameterValueByName node. The parameter name and value will likely be clear to you at that point.