# Lacing a codeblock?

**URL:** <https://forum.dynamobim.com/t/lacing-a-codeblock/97611>\
**Category:** Lists-Logic\
**Tags:** dynamo\
**Created:** [January 29, 2024, 6:30pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611 "2024-01-29T18:30:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidV](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DavidV](https://forum.dynamobim.com/u/DavidV)\
**Post date:** [January 29, 2024, 6:30pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/1 "2024-01-29T18:30:28Z")

</div>

Hi,

I created a “between” node in a code block where it evaluates if the value (in this case the point Z value) is between a certain range. Output should be true and false which i got now.

It works correctly see image below

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

But my problem is that it should evaluate all the values of the input list (in this example 52) and not just only one. If i right click on code block there is not a possibility to put in on longest (lacing). Am I doing this wrong?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [January 29, 2024, 6:51pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/2 "2024-01-29T18:51:40Z")

</div>

Hi @DavidV - to do this, you’ll want to lean into both **List@Level** and **Replication Guides** , which you can read more about here: [DesignScript: A Robust Dive into the Language Underlying Dynamo](https://github.com/Amoursol/dynamoDesignScript/blob/master/DesignScript_ARobustDiveIntoTheLanguageUnderlyingDynamo_Handout_BILTEUR_Ljubljana2018.pdf)

For your specific case, it’s got to do with **List Levels** - if you simply flatten the output of your `+` and `-` nodes it will work well. However, if you need to keep the List Structure, you can do the following:

`inp >= lowerCheck@L1<1> && inp <= upperCheck@L1<1> ? true : false;`

Where the `@L1` portion is defining the List Level and the `<1>` portion defining the Replication Guides.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/a/cab2d3f3b9c4607c7b5f6ece5050f92583879ae5.png)

---

<div class="post-metadata">

**Author:** ![DavidV](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DavidV](https://forum.dynamobim.com/u/DavidV)\
**Post date:** [January 29, 2024, 7:09pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/3 "2024-01-29T19:09:54Z")

</div>

It works, thank you for your quick response!

I’m still a beginner regarding code block design scripts. I was already happy that I managed it so far but I will read more about the page you mentioned 🙂

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [January 29, 2024, 7:52pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/4 "2024-01-29T19:52:59Z")

</div>

> [@DavidV](#):
>
> I’m still a beginner regarding code block design scripts. I was already happy that I managed it so far but I will read more about the page you mentioned 🙂

There is some incredible power in them, especially if you look at things @Vikram_Subbaiah does 🤩

The link above is my presentation at BILT EUR in 2017 about the language, covering a bunch of basic concepts and how to use them.

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [January 29, 2024, 7:57pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/5 "2024-01-29T19:57:34Z")

</div>

You could also use lowercheck[0] and uppercheck[0] to get the first item from your lists, because your upper and lower check values are not just values, but a list with a single value in it.

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [January 29, 2024, 9:57pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/6 "2024-01-29T21:57:15Z")

</div>

I’ve never seen @Vikram_Subbaiah doing TSpline and Mesh things in DS (if possible).  
Love to see it though 🙂

---

<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:** [January 29, 2024, 10:56pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/7 "2024-01-29T22:56:57Z")

</div>

> [@Marcel\_Rijsmus](#):
>
> I’ve never seen @Vikram_Subbaiah doing TSpline and Mesh things in DS

Have explored T-Splines a bit, not always with DS.  
3D Printed T-Spline Chair in [Dynamo Challenge 04](https://forum.dynamobim.com/t/dynamo-challenge-04-furniture-design/78882/7), the [Snow Flake Challenge](https://forum.dynamobim.com/t/snow-flake-challenge/69795/2) and at other old posts [like this](https://forum.dynamobim.com/t/complex-geometry-in-dynamo/18950/10)  
Will look into it some more though. Thanks for the suggestion 🙂

Mesh, not so much 😐

Apologies for this off-topic response

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [January 30, 2024, 4:38pm UTC](https://forum.dynamobim.com/t/lacing-a-codeblock/97611/8 "2024-01-30T16:38:11Z")

</div>

> [@Vikram\_Subbaiah](#):
>
> Have explored T-Splines a bit, not always with DS.

What’s coming in a not-too-distant release (After 3.0) will be _Extended Node Help_ for every single TSplines node and also a graduation out of Experimental (Finally!).
