# Code Block Function Help

**URL:** <https://forum.dynamobim.com/t/code-block-function-help/90333>\
**Category:** DesignScript\
**Tags:** dynamo\
**Created:** [June 2, 2023, 8:58pm UTC](https://forum.dynamobim.com/t/code-block-function-help/90333 "2023-06-02T20:58:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick\_podeyn](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick_podeyn/32/86368_2.png) [@patrick\_podeyn](https://forum.dynamobim.com/u/patrick_podeyn)\
**Post date:** [June 2, 2023, 8:58pm UTC](https://forum.dynamobim.com/t/code-block-function-help/90333/1 "2023-06-02T20:58:08Z")

</div>

I’m trying to figure out how to or if it’s possible to use design script node calls in functions. I have here a relatively small example of trying to flatten a list of lists and I am not able to get it to work in the function. Any ideas on how I can get this to work, or is this not how functions are intended to be used?

Cheers,

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/b/7bf71127f07b26530956f9328e3bb5e8f2617e83.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 2, 2023, 9:47pm UTC](https://forum.dynamobim.com/t/code-block-function-help/90333/2 "2023-06-02T21:47:17Z")

</div>

It does work, it’s just that auto-lacing is taking over since you haven’t defined an input structure.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/b/0b7a73eb282bae881bc5ca16158cda9f9e1385db.png)

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [June 2, 2023, 9:50pm UTC](https://forum.dynamobim.com/t/code-block-function-help/90333/3 "2023-06-02T21:50:22Z")

</div>

too fast M. Nick

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/5/95655e3ced8429a706709fcf28681e35fb6648a3.png)

cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![patrick\_podeyn](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick_podeyn/32/86368_2.png) [@patrick\_podeyn](https://forum.dynamobim.com/u/patrick_podeyn)\
**Post date:** [June 5, 2023, 12:43pm UTC](https://forum.dynamobim.com/t/code-block-function-help/90333/4 "2023-06-05T12:43:23Z")

</div>

I see! That’s cool! I’ll have to play with this one. Now, where can I go to read up on the different input structures for code blocks?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 5, 2023, 1:11pm UTC](https://forum.dynamobim.com/t/code-block-function-help/90333/5 "2023-06-05T13:11:51Z")

</div>

The design script guide lists them out, along with most of the finer points. It’s a complex topic though, so if you have questions start up a new topic for each.

> **[DesignScriptGuide.pdf](https://dynamobim.org/wp-content/links/DesignScriptGuide.pdf)**
>
> 460.12 KB

---

<div class="post-metadata">

**Author:** ![akshay.korlekar](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@akshay.korlekar](https://forum.dynamobim.com/u/akshay.korlekar)\
**Post date:** [March 3, 2025, 4:51am UTC](https://forum.dynamobim.com/t/code-block-function-help/90333/6 "2025-03-03T04:51:48Z")

</div>

yes, that’s true. This one is extensive but was difficult for me to understand from scratch so resorted to the Dynamo Language Manual first. The next in line for me would be this one.
