algorithmic modeling for Rhino
Here is the very simple script I am running as a If branch ...
Private Sub RunScript(ByVal f As Object, ByVal Ai As Object, ByVal Bi As Object, ByRef Ao As Object, ByRef Bo As Object)
If f Then
Ao = Ai
Bo = Nothing
Ao = Nothing
Bo = Bi
This has worked great for me in the past. However, I am now feeding Ai and Bi with different sizes of data and getting strange results. For example, I send four Lines into Ai and three Lines into Bo. When f is True, Ao produces the expected output; when f is False, Bo gives me four lines of output by duplicating the last one in its list.
Any ideas here?
"I send four Lines into Ai and three Lines into Bo." You mean into Bi?
If you plug 4 items into Ao, three items into Bo and one item into f, then the script will run 4 times if the Data Matching is set to Longest List.
If you only ever have one value for f, then I recommend you set Ao and Bo to be Tree parameters instead of Item parameters.
I've been using it like this for ages so the "new" behavior was really throwing me off. Thanks.
Nothing new here. It's been working like this for a long time.