Copy Hangers Conduit Racks

Hi guys,
I’m trying to make a script that copy a unistrut in a rack of conduits every 8’ and 2’ depending on the length of the conduit I choose as reference. It relies on the direction of the rack (North/South, East/West).
I can accomplish what I want by using 2 boolean buttons (Positive or Negative direction and X or Y Orientation) but it might be confusing for the users. I prefer using data-shapes radio buttons for easier inputting.
The problem I’m facing is that when I connect “<” node to the test port of the “if” node, it only outputs 1 vector, hence, only 1 unistrut is copied. If I connect a True/False (from Direction boolean) node to the “if” node it outputs all the vectors I need for copying all the unistruts. I don’t understand why, in the first case I only get one vector as a result and in the other case I get all I need.

Can anyone help me here in order to use only the data-shape (radio buttons) input and not using both, the boolean and the radio buttons input?

I’m a newbie using dynamo. So, I’ll appreciate any constructive comment to improve my script.

It probably has to do with the list structures you’re providing. Can you post an image with the node preview bubbles visible so we can see what your inputs are?

Thanks for the quick reply.

When I ran it, I chose East as direction. It only copied one unistrut at 10 feet (B) and a copy of that one at 2 feet backwards (B’). The Idea is copying as many unistruts as the number of elements in the list from the node List.DropLastItem.

This is what I get

Yup, your < node is returning a list of one boolean, which is causing the If node to return a list of only one vector. You need that to be a single boolean value for the test input so that it returns the whole list of vectors.

Just use a codeblock with something like list[0]; to get the singleton boolean value.

Man!!! you’re great!

Thanks a lot!!!