Code block definition


I have a rather large code block which I want to seperate out as a defininition for easier use (As I will repeat the step for all of the items in the first codeblock . However it doesn’t seem to behave the way I want it. Anyone got a clue?

Bilde uten tittel


Could you try the following - in your CBN change the first line from “def Curvebyind(list)” to “def Curvebyind(list:var[][])”

That way your definition should know to expect a list of lists



Hello Jostein Olsen,

What Dimitar has mentioned is correct. In DesignScript language (which is a back bone of Dynamo), you have to mention input type while writing definition in CBN.




Ok, thanks! But I have stumbled upon another problem when I do as you have specified:i get “tSSA_168_asdfasdkf etc. is over indexed” in the calling code block. Got a clue?


I got it to work, but does someone know how I could repeat the list[x][3…5] and Curvebyind for , lets say, the length of the original list?