Reading Yes/No values in Excel and writing in Revit

Hello to all,
My premisses:

  1. Originally in revit the Yes/No parameter (instance parameter) is set to “unchecked
  2. The list is written in excel by using a dynamo graph, where 0=unchecked and 1=checked
  3. In Excel the column is progressively updated, so values will vary from “0” to "1"
  4. Another graph will read from excel, translating values “0” and “1” to, respectively, “unchecked” and “checked” and combine to the right elements by using UniqueId.

The problem:
I’ve tried to filter results by using OOTB node “IF”, but it returns always the same value (1=Checked) to all elements…


Do someone has a hint of what to do?
Thanks in advance!

The output from your List.GetItemAtIndex (SL_095_MaterialInstalled) are all zeros and ones, so you are not feeding the If node boolean values (you’re essentially feeding it all trues). But you don’t need to conduct an if test at all; just connect your List.GetItemAtIndex output to String.ToNumber and set your values with that.

2 Likes

Thanks for the solution, Amy! It worked perfectly! I just begun with Dynamo and I’m having some dificulties with the logical aspect of the language.

1 Like

No problem! If you haven’t already, I recommend doing the Dynamo Primer from start to finish, it’ll help a lot in the long run :slight_smile: http://primer.dynamobim.org/en/