I am trying to use Parameter Optimization Loop Start to make variables and pass to Python Script Node for some calculation. However in Python Script Node, I can’t see the variable created by Parameter Optimization Loop Start.
It seems Parameter Optimization Loop Start can create and pass variables to next node but Python Script Node cannot receive variables from any node.
I also try some other nodes between Parameter Optimization Loop Start and Python Script Node, such as Python Edit Variable node, Merge Variables node, and even Variable to Table Row node and then Table Row to Variable node, none of them can pass the variable to Python Script Node.
I have another node input data frame to Python Script node so I can only use Flow Variable Port for the variables.
your design is not right. You can not have same node connected to two loop start nodes. (You should get warning in Console about this saying that loops/scopes not properly nested.) So in original issue if your Python Script is already in a loop wrapping it up around Parameter Optimization Loop will not work and you won’t be able to see flow variables from it. Solution is to nest one loop within other meaning in your case to to connect one of preceding nodes to Parameter Optimization Loop Start using flow variable connection.
Now I fix it by revising the Python code. But somehow I may have some cases need to optimise parameters in another loop so better think for a solution.