I’m sorry if this seems like a very basic question (tried to look for some similar posts but couldn’t find one).
I am trying to use the “If” node to generate different results. In my example, the goal is to delete either CAD Link or Imported Links.
When the user ticks “CAD Imports”, I want the script to delete all imported CAD files generated from Bimorph’s CAD.ReportInstances node.
Problem is, the final “If” node does not get all list values from the previous node - it only takes the first item on the list. I thought I could remedy this with Lacing but If node doesn’t have Lacing property. I tried the Longest Lacing node but not sure what combinator input needs.
Interestingly, adding a “List Create” node to only one of the previous results gives me the list. However, adding them to both gives me only the first item.
Here, I get all items from the list:
After adding “List.Create” node to both, I get the same issue again:
The problem probably has to do with how if node works on different length lists for the true and false values. The common alternative is ScopeIf but it can be a bit trickier.
I don’t remember the exact details but I am sure there are several posts somewhere comparing the two. Some older examples include IF node and If and Lists of different lengths
The normal ScopeIf somehow loads slower, and gives a “null” output to my CAD.ReportInstances node (didn’t know a proceeding node could affect the nodes that precede it). I tried to test it several times… I guess it’s not stable enough?
Anyway, thank you so much for introducing me to this node
I agree with you in using Clockwork ScopeIf+, which I believe contains a version of Jean-Marc’s solution.
As you’re finding you need to be careful with the OOTB ScopeIf, it is designed to be used within custom nodes…
I had graphs freeze because the unexecuted branch was being used for other nodes downstream (say you wanted a dated folder inside an undated folder, but not having the first one dated you can accidentally freeze the second create node and the whole thing stops).