# List combine function and Robot Structural Analysis

**URL:** <https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917>\
**Category:** Packages\
**Created:** [January 17, 2017, 3:10pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917 "2017-01-17T15:10:05Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 17, 2017, 3:10pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/1 "2017-01-17T15:10:05Z")

</div>

Hello Dynamo-users,

I’m trying to automate a construction calculation in RSA in combination with Dynamo and Revit. I made my script where i load my profiletypes from Excel, generate geometry based on a revit surface and after this translate is into robot.

The translation to robot is made in a custom node. This custom node is used as a function for list combine. This combination makes the profiletypes different every calculation. After it worked out a couple caclulations it does not return all the results. This is visible in the pictures below.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/7/f7274e0304583aa2a7c08bfbcf192f068674e94f.PNG)  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/1/b112fc1e09af6ad73c8ec2036ea09aba0d302657.PNG)  
The custom node inputs are:  
DirectoryPath  
All loaded profiles  
Requierd profiles  
Profile on each bartype  
Forces  
Material type  
Construction geometry in the form of lines.  
Support node points  
Construction surface  
Profile distance. (just for the save)

Can anyone help me or at least explain why this proces is going wrong in the first place?

I can upload the script if thats necessary.

Vincent.

---

<div class="post-metadata">

**Author:** ![Ben\_Osborne](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_osborne/32/17366_2.png) [@Ben\_Osborne](https://forum.dynamobim.com/u/Ben_Osborne)\
**Post date:** [January 17, 2017, 4:52pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/2 "2017-01-17T16:52:04Z")

</div>

Custom nodes sometimes seem to be reading the length of all of the inputs, and only return results that match the length of the shortest input. Essentially they are following lacing conventions, even if the contents of the node do not. (I ran into a similar situation where a group of nodes not put in a custom node returned 15 values, yet when packaged up in a custom node only returned 6 - this was the issue.) Simply adjust the lacing behaviour of the custom node to longest or cross-product and I imagine it will work out.

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 17, 2017, 9:12pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/3 "2017-01-17T21:12:25Z")

</div>

I will test this tonight and post the results tomorrow. Hopefully this is the issue.

Thanks in advance Ben!

Vincent

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 18, 2017, 6:46pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/4 "2017-01-18T18:46:28Z")

</div>

@Ben_Osborne

Unfortunately, it did not work. I made some changes in the script and try it again tonight.  
Hopefully I will fix this on time. Friday is the school deadline

Vincent

---

<div class="post-metadata">

**Author:** ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)\
**Post date:** [January 19, 2017, 12:50pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/5 "2017-01-19T12:50:07Z")

</div>

Depending on your particular case List.LaceShortest and List.LaceLongest might be of help  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/a/0/a08a0497a2f8e49b8a78822846668eae14cc134d.png)

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 19, 2017, 12:56pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/6 "2017-01-19T12:56:38Z")

</div>

Does this do the same as List.combine? I use List.CartesianProduct to make a combination of all variables.

---

<div class="post-metadata">

**Author:** ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)\
**Post date:** [January 19, 2017, 1:12pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/7 "2017-01-19T13:12:10Z")

</div>

Basically List.Combine gives you nulls when the lengths of the lists are not the same

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/9/19c13926e7638d4bc0b1c4d5e103d6da83fa666d.png)

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 19, 2017, 1:23pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/8 "2017-01-19T13:23:57Z")

</div>

I use it to fill in the empty spots in the custom node. How does that work with list.LaceLongest?  
The lists i’ll put in the combine node got the same length but those in the custom node are single inputs.

I don’t know how to fix this with your nodes?

Thanks in advance,

Vincent

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2f7ecfea7971d3c299d6f7215f75eb6160d9aba1.PNG)

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [January 19, 2017, 2:22pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/9 "2017-01-19T14:22:12Z")

</div>

How does your custom node look like? Have you defined the data types correctly as shown by Dimitar in this thread?

> [@How to Handle Variable Input List Length/Nesting in Custom Nodes (Python)](https://forum.dynamobim.com/t/how-to-handle-variable-input-list-length-nesting-in-custom-nodes-python/3192/5):
>
> Have you tried defining your inputs? That way you’ll enable lacing and as long as there’s a logical way, the Dynamo VM will map the inputs to the function correctly. This will first make sure to check that the input is for example indeed a point type. Secondly it’ll automatically convert it to a single object, a list or a matrix depending on your definition. This also works for python scripts, but from my experience it has…

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 19, 2017, 2:53pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/10 "2017-01-19T14:53:39Z")

</div>

this is how the input ports look like. I added nodes with what type of material comes in. How should i define my input ports?

I added the script in this post.

Thanks in advance

Vincent  
[ParametricRun.EAELasttry.dyf](https://forum.dynamobim.com/uploads/short-url/dgxXmHxvCq6zLPF7CMCNKk8bYwi.dyf) (100.9 KB)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/0/90e67d1091da1b95efd17785781acccf0f1f6c06.PNG)

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [January 19, 2017, 3:17pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/11 "2017-01-19T15:17:21Z")

</div>

Maybe this example helps?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/e/9ecd9bb47171007688d60faf574adc075e234bfc.png)

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 19, 2017, 3:32pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/12 "2017-01-19T15:32:17Z")

</div>

@Einar_Raknes,

I made this from my script input. Thanks for your advice. I will test it later today!  
Does it matter that all input ports are var?

Vincent

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/7/47bc7ce28c430c97d3b5c124fe1d55a3ef668ca1.PNG)

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [January 19, 2017, 3:42pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/13 "2017-01-19T15:42:15Z")

</div>

> [@Vincent\_Olthuis](#):
>
> Does it matter that all input ports are var?

No 🙂

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 20, 2017, 7:21am UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/14 "2017-01-20T07:21:21Z")

</div>

@Einar_Raknes,

Does it matter for a custom node to have different type of inputs? Or do they need to be the same? I was wondering this with the lacing of the node in combination with List.Combine. I still get a bunch of Null values add the end of the calculation.

Vincent.

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [January 20, 2017, 7:46am UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/15 "2017-01-20T07:46:22Z")

</div>

Have your tried to skip the list combine node and connect the inputs directly to the custom nodes? When the single inputs are defined as single input (:var) Dynamo should be able replicate the lists correctly. Maybe play with lacing options and levels.

> [@Vincent\_Olthuis](#):
>
> Does it matter that all input ports are var?

It is supposed to work with different types, yes.

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 20, 2017, 11:39am UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/16 "2017-01-20T11:39:38Z")

</div>

The direct input works well. I tried up to 16 variants. The next try is 81. Hopefully the results will be the same!

Thanks Einar!

---

<div class="post-metadata">

**Author:** ![Vincent\_Olthuis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vincent_olthuis/32/8543_2.png) [@Vincent\_Olthuis](https://forum.dynamobim.com/u/Vincent_Olthuis)\
**Post date:** [January 20, 2017, 12:37pm UTC](https://forum.dynamobim.com/t/list-combine-function-and-robot-structural-analysis/8917/17 "2017-01-20T12:37:59Z")

</div>

By the way, i used the list.combine node because i saw an example that used the same work around. The 81 variants worked fine. 260 is up next!
