I’m working on a script to apply view templates based on a structured naming convention. There’s an exception to whether the project is a renovation or new construction only (View Names start with “N_” and “D_” for renovation projects). I’m trying to account for this exception by using an IF statement to drop the first element in the list from the parsed string (separating by “_” from a SCREAMING_SNAKE_CASE view name). See Below.
with outputs
Compare item 140 and 141. Both outputs should result in a list of length=5, but after the if statement, 141 has the last element dropped, so it’s not like it’s passing the output from the list.drop node. It seems like it wants the dimension of the output list of the IF node to match the dimension of the output list of the list.drop node, so it’s just removing the last element of 141.
In the past, I think I’ve seen discussions about how there’s a weird issue with IF statements where you get bad outputs if you pass the same variable name through both T and F connections of the IF. Not really sure how to resolve this.
suggestions? this is another one of those situations where it seems like it would be straightforward to do in a conventional programming language.