List consisting of both values and booleans from excel to revit

I’m sending a pretty massive list of values from excel into revit. This contains both values and integers and that has been handled fine. I’m looking for a way so that it’ll also allow booleans to come through, I’m guessing Dynamo allows those to pass through the element.setparameterbyname node, but I don’t know how to make sure Dynamo reads certain excel inputs as true or false inputs.

Do reailize that both the numerical values and booleans will come from the same list.

First of all I’d like to know if it’s even possible to send booleans into the value input of that node, I’m guessing that shouldn’t be a problem.

If so then I’d like to see a way that’d allow me to get boolean values from excel. I wondered maybe with an if statement that’d just changes the things that gave “true” or “false” into an actual boolean and ignoring all the numerical values. But that made me realize again that I don’t find the Dynamo if statement comfortable to work with.

Thanks in advance!

Can you show some of your data?

I’d like to import something like this:

And I’d like to see actual booleans within the list which isn’t the case here:

Have you imported everything as String?

No, it accepts the numbers just fine. Would converting it back and forth help?

are the items in list 21 Strings?

No, it’s 21 lists.

@PauLtus look at this post;

1 Like

That seems like it should be the solution, however, I’m not quite sure what I’m supposed to send into the condition input.

I’m not letting it read als string, if I do, I don’t know how to convert the numerical values back.

21 is the last list of your list of lists. Remove it. Convert it. Add to end


Well that is a solution which I could’ve figured out myself,but simply not the kind I want, because I’d have to pick out every single true/false value to manage that. There’s 21 values going in now, it might become more, and I try to keep the entire thing as “elegant” as possible.

I can actually solve it in Revit itself as well by “converting” an integer into a true or false value, but that’s not exactly elegant either.

Could this suffice?


It does suffice.
Thanks a lot!