Run list items one after other


#1

In this example I want the sect parameter node to pass the value one by one and wait each time the graph completes to pass the second value .
here I want to export t all images for different heights of ceiling …! is this an list problem plz assist me on this…
thanks,


#2

Graph isn’t legible, can you zoom in on a node so it’s readable and re-do the camera export? May require creating a function from the series of nodes but I can’t tell without seeing the full graph.


#3

just updated…! plz check again


#4

Have a go at the LoopWhile node, this involves creating a custom node. Inspiration on the subject can be found in the two posts here:



#5

thanks @Jonathan.Olesen for the reply,

One thing I don’t understand is even in the image you shared the watch node has a list of all the items, where as what i am looking for is to pass one item at a time,also I find it really difficult to understand the function nodes(may be i can if you could share some more examples),I would prefer a loop code in python but that also gives me results as a list.! any help…?


#6

So I think what you’re saying is you want the whole graph to run on the first item before starting on the second item. This isn’t really how graphs work. They run one node at a time (generally). However, you could simply wrap your graph in a custom node and you should be able to get the functionality you’re looking for - the graph will run the entire custom node one item at a time.


#7

Hi @Nick_Boyts, can you please elaborate this I think I not getting your comments.
Do you mean to copy every thing on my graph to custom node and then run the graph…??
like the image below.

OR
you mean to create a node with python that can do this? I tried with python while loop as well but, was struck in the middle not knowing the syntax to ask python to process items one by one.
Thanks,


#8

I believe that @Nick_Boyts means to custom node, or otherwise define a function to perform the items iteratively over the whole list.

Custom node is likely the fastest way to do this.


#9

Python would be another option, but if you’re not familiar a custom node would be much quicker and easier.


#10

Hi, I am sorry, still wondering how to add this functionality(passing one by one) in custom node…! you have an example that I can refer to.I hope that would be very helpful. I am bit week at making custom nodes.


#11

Nodes execute one at a time. So by wrapping everything in a custom node each item in a list will be executed one at a time, regardless of how many nodes are inside. The node acts as a single function at that point.


#12

does this mean copy entire graph into custom node?
I did it except for the ceiling heights which I had as a list like the image below

image

but when i check the images generated all of them were same…!

did I understand correctly? I am I missing something??


#13

Have you tried bigger values than 2…15? (these are mm i’m guessing) try 500…10000…4 or something like that :slight_smile:


#14

Correct. Anything that gets executed after your initial input would go in the custom node.


#15

It works fine and changes good for 2…15,the only problem is It doesn’t wait for the graph to complete before moving to next index


#16

Thanks @Nick_Boyts ,but thats exactly how i made the custom node(“one at time”)

why is it still not working for me??
here is the snip of custom node…! and the file in case you want to have a look

one item at a time.dyf (13.9 KB)


#17

Your node might still be expecting or handling lists. You could try setting lacing to longest or chopping your list up into sublists of single items. This is just a guess though.


#18

It might also help specifying the input type in your input node so that the node know what kind of input it should expect (e.g. single items, rather than lists)


#19

Here’s what I had to do to get it to work. If you’re running each item separately you’ll also need to specify a file path separately, otherwise the node will just keep overwriting the same file. I also had to break the process into two transactions to make sure the parameter was being set before the image was being created.

one item at a time.dyf (13.3 KB)


Running multiple nodes for each item in a list
#20

wow…! Excellent, I tried the same just forgot the levels…! You saved my day…! thanks a lot