# Create Sublist at certain instance

**URL:** <https://forum.dynamobim.com/t/create-sublist-at-certain-instance/92750>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [August 9, 2023, 6:07pm UTC](https://forum.dynamobim.com/t/create-sublist-at-certain-instance/92750 "2023-08-09T18:07:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TiagoGoncalves\_QD\_ES](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@TiagoGoncalves\_QD\_ES](https://forum.dynamobim.com/u/TiagoGoncalves_QD_ES)\
**Post date:** [August 9, 2023, 6:07pm UTC](https://forum.dynamobim.com/t/create-sublist-at-certain-instance/92750/1 "2023-08-09T18:07:58Z")

</div>

Hello again!

I am working on a script to automate Beam Mark id and have hit a bit of a challenge.

I would like to create a Sublist every time this list contains the value -1. at the right i have the desired result.

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

Can anyone help?

Kind Regards!!!

---

<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:** [August 9, 2023, 6:59pm UTC](https://forum.dynamobim.com/t/create-sublist-at-certain-instance/92750/2 "2023-08-09T18:59:20Z")

</div>

The objective of the forum is not to do the work for others,  
More help if ever at some point you are stuck on a process on everyone’s free time, given the speed of the second post I don’t know if you really had to look (the benefit of the doubt)  
Here is a ‘‘solution’’ or approach  
it didn’t take me 1 minute, like what when you try you end up finding (resilience and time)  
edit:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/d/2d864b8e8a866ba2991fe3e908c5f92d2c35caea.jpeg)  
Sometimes even while spending time, you provide a big dung too,  
(morality either you drop everything and tell yourself it’s not for you, or either try again try again it depends on everyone, but at least for the guy who took the time to lift the hare (your shit in fact)) , you try again and normally in the more or less long term, you progress)

Have a good evening

cordially  
christian.stan

---

<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:** [August 9, 2023, 8:04pm UTC](https://forum.dynamobim.com/t/create-sublist-at-certain-instance/92750/3 "2023-08-09T20:04:46Z")

</div>

Careful here. You’re getting the right output only because your list length is less than your chop length and the first item always happens within a “working” range. The chop length wouldn’t be equal to the sum of an indexed sequence. It would be equal to the number of “steps” between items.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f5acda330f24b5b6f3cd255a718d060b4bff20d5.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:** [August 9, 2023, 8:09pm UTC](https://forum.dynamobim.com/t/create-sublist-at-certain-instance/92750/4 "2023-08-09T20:09:29Z")

</div>

You would have to convert index to length (+1) and then find the difference between the current index and the previous start/end point.

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

---

<div class="post-metadata">

**Author:** ![TiagoGoncalves\_QD\_ES](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@TiagoGoncalves\_QD\_ES](https://forum.dynamobim.com/u/TiagoGoncalves_QD_ES)\
**Post date:** [August 9, 2023, 11:59pm UTC](https://forum.dynamobim.com/t/create-sublist-at-certain-instance/92750/5 "2023-08-09T23:59:16Z")

</div>

Really appreciate your help!

Kind Regards!
