LoopWhile for a variable X, need output for a variable Y

Hi all,

My script in attachment is a principle where I want to loop the value of X of an analytical node, calculate the reaction force for it, and return the value for the FZ reaction force. I.e. return all FZ values for a range of X between 2 and 8 meter, each 1 meter increment. This can’t be solved with ranges, because each translation of X needs the RSA.Calculate node to start simulations in Robot Structural Analysis to return a result. So I started an initial situation with nodes and a bar. One of the nodes gets transferred to a custom node, which handles the translation of the node within RSA and which launches the calculation and returns the result of FZ.

When I connect FZ to the LoopBody of the LoopWhile node, then only one loop is done. When I connect X then it loops until the “upper limit”, but still I can’t return the value of FZ.

Anyone that can help me figuring this out?

Thanks ! Dieter

Loopwhile 2

 

 

 

 

 

 

General Project: LoopWhile SimpleBar

Custom Node: BarAnalysis

Hi Dieter,

You must treat each output on your custom node as a separate function for this to work. Unfortunately the default "LoopWhile "node can not accept more than 1 function. Therefore we will have to build our own loop:

2015-03-27_112711

 

However I’m not entirely sure if this method will work well with custom external libraries like RSA. I can’t test your workflow because I don’t have Robot unfortunately.

1 Like

Hi Dimitar,

Perfect, it worked ! Thanks a lot !

Dieter

LoopWhile w Design script

looptest

temp3

Technically, it should work for your case as is.