# Node to DesignScript

**URL:** https://forum.dynamobim.com/t/node-to-designscript/1682
**Category:** Packages
**Created:** [June 25, 2015, 11:34am UTC](https://forum.dynamobim.com/t/node-to-designscript/1682 "2015-06-25T11:34:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Rashed\_Singaby](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rashed_singaby/32/18046_2.png) [@Rashed\_Singaby](https://forum.dynamobim.com/u/Rashed_Singaby)
#### Post date: [June 25, 2015, 11:34am UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/1 "2015-06-25T11:34:25Z")

</div>

What’s the best way to figure the designscript equivalent of a node?

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [June 25, 2015, 11:38am UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/2 "2015-06-25T11:38:20Z")

</div>

Just hover over the node

---

<div class="post-metadata">

### Author: ![Rashed\_Singaby](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rashed_singaby/32/18046_2.png) [@Rashed\_Singaby](https://forum.dynamobim.com/u/Rashed_Singaby)
#### Post date: [June 25, 2015, 11:43am UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/3 "2015-06-25T11:43:53Z")

</div>

Vikram, Thanks for the quick reply. This does not necessarily apply to all nodes. List.Map and Geometry.Explode for example are a couple that I can’t get to work…

---

<div class="post-metadata">

### Author: ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)
#### Post date: [June 25, 2015, 2:00pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/4 "2015-06-25T14:00:54Z")

</div>

You can also download the latest daily build and check out node to code. :lol:

---

<div class="post-metadata">

### Author: ![Rashed\_Singaby](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rashed_singaby/32/18046_2.png) [@Rashed\_Singaby](https://forum.dynamobim.com/u/Rashed_Singaby)
#### Post date: [June 25, 2015, 3:33pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/5 "2015-06-25T15:33:56Z")

</div>

How to check node to code?

---

<div class="post-metadata">

### Author: ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)
#### Post date: [June 25, 2015, 8:40pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/6 "2015-06-25T20:40:45Z")

</div>

Daily builds after 0.81 have it as an option. Just select your nodes, right click on the canvas and choose “Node to Code”. Unfortunately List.Map isn’t supported at this moment. Tho you can search the forum for some examples on how to use it in DS:

[http://dynamobim.com/forums/topic/transforming-a-list-map-function-into-a-code-block/](http://dynamobim.com/forums/topic/transforming-a-list-map-function-into-a-code-block/)

I just tried using the “Node to Code” functionality with the Geometry.Explode and it worked wonderfully:

![2015-06-26_10-04-21](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/8/8162f4ac17d8b0c4495e3a5f3278ce9a989ad5a3.png)

![2015-06-26_10-03-34](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/0/073c2a97432481fa67f2ac6996cf891f68233774.png)

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [June 25, 2015, 9:34pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/7 "2015-06-25T21:34:17Z")

</div>

The _List.Map_ functionality (and more) can be achieved in Design Script by defining functions.

However, one thing that probably still isn’t possible is - specifying a function as a key (like in _SortByKey_) within the script.

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [June 25, 2015, 9:58pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/8 "2015-06-25T21:58:57Z")

</div>

Map node to Script

![20150625-1](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/6/6301c2ec92f414338e907442df1b28558abeced6.jpg)

---

<div class="post-metadata">

### Author: ![Alex\_Ogata1](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@Alex\_Ogata1](https://forum.dynamobim.com/u/Alex_Ogata1)
#### Post date: [June 26, 2015, 3:19pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/9 "2015-06-26T15:19:33Z")

</div>

Is there a way to use the List.Map node to go into more than one sublist level?

In your previous example, you use it to get all items of index “2” in all sub-lists. Where the node assumes you mean to search only one sublist level down

What if you have a further sublist level?

Is it possible to extract items of index “x” at a specific sublist level?

&nbsp;  
 ![Capture](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/2/22da8049ba8799232942d93a83e8d58034b3fd5f.png)

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [June 26, 2015, 8:29pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/10 "2015-06-26T20:29:28Z")

</div>

![20150626-1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/59aa0decc09cdab6a8795df945e4cddfaff067c7.jpg)

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [June 26, 2015, 8:57pm UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/11 "2015-06-26T20:57:21Z")

</div>

The previous post example with _List.Count_ should help explain the concept better than the below example using _List.GetItemAtIndex_

 ![20150626-2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/f/f296655d706542cb3e71cf28a2d680e80e126df5.jpg)

---

<div class="post-metadata">

### Author: ![Alex\_Ogata1](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@Alex\_Ogata1](https://forum.dynamobim.com/u/Alex_Ogata1)
#### Post date: [June 29, 2015, 11:15am UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/12 "2015-06-29T11:15:05Z")

</div>

Thank you, that is super helpful. I guess I don’t really understand list management and List.Map in particular. In fact, I found your designscript definition much more clear.

As a follow up, I am also puzzled by how these 2 definitions (attached) behave. Especially how the Curve.EndPoint and Curve.PointAtParameter differ in their behavior. I expected them to behave the same way. Would you help illuminate why they act like that?

![Capture](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/3/3708628cfc9d68ec6298887cba0e593d97f194e4.png)

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [June 29, 2015, 11:52am UTC](https://forum.dynamobim.com/t/node-to-designscript/1682/13 "2015-06-29T11:52:26Z")

</div>

Alex - the use of curly braces at the beginning of each of your examples structure the sub lists differently. Different input structures are giving you different results.

![20150629-4](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/e/e2872909add4209a82f3d52964fd93d4ee748901.jpg)
