Hi all,
I am quite new in learning the DesignScript. Could you help me to understand which is the difference between the two lists “b” and “inst” of the screenshot? I don’t really get the problem. They look to be both a List with one element, the layer of cad link.
You’re confusing an output with a variable.
You’ve defined inst
as [null]
, a list including a single null value. When you use ReplaceItemAtIndex
, you’re applying arguments to a function that returns a value. That returned value matches b
but you haven’t actually done anything to inst
. So when you call inst
again later with CurvesFromCADLayers
, you’re still supplying the original variable for inst
([null]
).
1 Like
Thanks a lot for the reply.
So if I want to work with a list inside a loop, for example updating a list every cycle in a while loop, I must use Python. I can’t do that inside code block.
You should be able to do it with an Imperative
block, but Python would likely be easier.