hi, I’m trying to get the Indices of elements, but in some cases these elements would be having the same value, and List.IndexOf node takes only one index and repeat it like in the picture. I did use List.AllIndicesOf node, and it gives the correct “unique” indices but it is spreading the tree as in the picture. any advice on leveling and/or lacing to make the List.AllindicesOf to show same leveling of the List.IndexOf?
Hi @Eddy.NiyaziTYJ7L ,
You could use a List.UniqueItems set to @L2 after your List.FilterByBoolMask node.
the issue is, despite these values look equal, but they are pulled from different parameters that happened to have same value. if i use the unique node. i will have only one value with one index and i end up with one of the three parameters changed. and the List.AllIndicesOf seems to do it, but it changes the tree leveling
Can you explain this in more detail? Right now you’re getting three lists because you have three values. If you only want one list, you should only provide one value. If this list of three values represents three parameters that need to change, then that’s a different problem. If each parameter needs to be controlled individually then you shouldn’t be comparing values only, as you get results for all matching values.
we r using view references that r dynamic, they rotate and get filled with the sheet numbers using another dynamo script that i wrote, however, the script became too heavy that i had to create a second script, that it would look into the existing sheets and look at those values, compare them with the values of the sheets that r not for issue, and if they match it removes them. that’s why the logic lead me to have to compare by the value not by the parameter name. so i came to the wall where the value sometimes unique and sometimes similar. so i needed to get the indices of each value even if they r similar
i reached a “solution” and the script kinda works, but with that error because of the nulls, and i don’t know of a way to remove the nulls while the list keeping the indices intact
How does List.UniqueItems
not get you the same result? That’s the part I don’t understand. If you can just remove the other two lists (from the other two parameters) then the parameters themselves don’t actually matter, only the values.