DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
340 stars 188 forks source link

Wish: List.FilterByBoolMask to accept 0/1 as True/False #2183

Open ColinDayOrg opened 6 years ago

ColinDayOrg commented 6 years ago

Issue by andydandy74 Wednesday Dec 17, 2014 at 16:09 GMT Originally opened as https://github.com/DynamoDS/Dynamo/issues/3436


When I pull data from Yes/No parameters using Element.GetParameterValueByName, Dynamo returns them as 1 or 0. However, List.FilterByBoolMask will only work with True/False. As a workaround, I can take this through a Formula node (x==1), but it would make sense if booleans were automatically converted between Revit and Dynamo. 0.7.5 RC

ColinDayOrg commented 6 years ago

Comment by ksobon Friday Dec 19, 2014 at 23:47 GMT


This should not be an issue since 0 is False and 1 is True in almost any programming language. An issue would be going from a VB based boolean value that is returned as "true" and Python which is case sensitive and expects "True". I never had any trouble with 0 and 1 not being interpreted properly. This is weird.

ColinDayOrg commented 6 years ago

Comment by andydandy74 Sunday Nov 29, 2015 at 16:36 GMT


Conditional statements in code block nodes aren't as fussy. They deal with 0/1 just like they are dealing with False/True. So it's the List.FilterByBoolMask node that should be augmented to also accept lists of ones and zeroes as a mask.

ColinDayOrg commented 6 years ago

Comment by ksobon Tuesday Feb 23, 2016 at 17:59 GMT


+1 I agree. List.FilterByBoolMask should accept 0/1 as True/False

ColinDayOrg commented 6 years ago

Comment by johnpierson Thursday Oct 04, 2018 at 15:44 GMT


Definitely still a wishlist item in 2.0.1 image