# Inconsistent behavior with replication guides

**URL:** <https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639>\
**Category:** DesignScript\
**Created:** [October 10, 2025, 2:06pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639 "2025-10-10T14:06:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![salmakh.1627](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@salmakh.1627](https://forum.dynamobim.com/u/salmakh.1627)\
**Post date:** [October 10, 2025, 2:06pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/1 "2025-10-10T14:06:17Z")

</div>

I’m still a beginner with designscript, so excuse me if this is a stupid question…  
I’ve been noticing that replication guides often give me inconsistent results. Here is an example of what I mean:

![Recording+2025-10-10+164843](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/9/c991dac4881bf9a8bade936a2e29b8fb3df199a9.gif)

Here I’m trying to change the replication guide from \<1\> to \<0\>, then back to \<1\>. The result after changing the replication guide back was different than it was before changing it. Why is that? I’ve been noticing this happening with several times. What am I doing wrong?

---

<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:** [October 10, 2025, 2:20pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/2 "2025-10-10T14:20:05Z")

</div>

> [@salmakh.1627](#):
>
> Here I’m trying to change the replication guide from \<1\> to \<0\>, then back to \<1\>

I don’t know if ‘0’ is supported as a replication guide. Can you reproduce with 1 and 2?

---

<div class="post-metadata">

**Author:** ![salmakh.1627](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@salmakh.1627](https://forum.dynamobim.com/u/salmakh.1627)\
**Post date:** [October 10, 2025, 4:44pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/3 "2025-10-10T16:44:14Z")

</div>

![Recording 2025-10-10 193810](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4eeb1a9a9183a372c9bbf927295febf6a9f18173.gif)

Still the same issue.

---

<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:** [October 10, 2025, 4:45pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/4 "2025-10-10T16:45:55Z")

</div>

Can you provide a SMALL sample dyn which replicates the issue using basic data?

---

<div class="post-metadata">

**Author:** ![salmakh.1627](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@salmakh.1627](https://forum.dynamobim.com/u/salmakh.1627)\
**Post date:** [October 10, 2025, 5:02pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/5 "2025-10-10T17:02:04Z")

</div>

[101025.dyn](https://forum.dynamobim.com/uploads/short-url/pHKNXzmiK8PYR4oMaqk7emfVyul.dyn) (4.7 KB)

I tried it with the list in this .dyn, and I’m still facing the same issues.

---

<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:** [October 10, 2025, 7:35pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/6 "2025-10-10T19:35:35Z")

</div>

This is a problem…

![2025_10_10 - Replication Guides bug](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/5/95195f849ac862f59286b812cb76719d1a003faf.gif)

---

<div class="post-metadata">

**Author:** ![salmakh.1627](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@salmakh.1627](https://forum.dynamobim.com/u/salmakh.1627)\
**Post date:** [October 11, 2025, 11:08am UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/7 "2025-10-11T11:08:01Z")

</div>

This is strange… how do I fix this? Or is there a way for me to rewrite my code so that I don’t have to face this issue? I know I can use nodes instead, but I’m trying not to use too many nodes because I find that my script ends up looking messy.

---

<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:** [October 11, 2025, 2:05pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/8 "2025-10-11T14:05:16Z")

</div>

> [@salmakh.1627](#):
>
> know I can use nodes instead, but I’m trying not to use too many nodes because I find that my script ends up looking messy.

Nodes, building it as a custom node (.dyf nodes), imperative design script, definitions, avoiding replication guides, or Python would work.

You could also reconsider how you go go about this - creating a dictionary instead of a list up front, or using List.FilterByBoolMask might work out well.

---

<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:** [October 14, 2025, 4:18pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/9 "2025-10-14T16:18:50Z")

</div>

Ok, we got an answer from Luis Rivera who did a deeper dive into design script’s execution engine. I’m quoting him here:

> Issue is that the generated DSASM assembly is not generating proper instructions for the replication guides of **default** arguments.`String.Contains(lst<1>,"Width",` `true` `)` executes without issue.  
> `String.Contains(lst<1>,"Width")` generates assembly for **two** replication guides but the executive expects **three**.What is happening in the videos shown is:
> 
> - State 1 (repguides: `[]`):
> - Replications guides `[1,0]` get pushed into the stack. Repguides are now `[1,0]`
> - The executive asks for **three** replication guides, doesnt get them and **doesnt pop them either** , and acts as if **there’s no replication guides**.
> 
> - State 2 (repguides: `[1,0]`):
> - Replications guides `[1,0]` get pushed into the stack. Repguides are now `[1,0,1,0]`
> - The executive asks for **three** replication guides, gets `[0,1,0]` from the top of the stack, pops them.
> 
> - State 3 (repguides `[1]`)
> - Replications guides `[1,0]` get pushed into the stack. Repguides are now `[1,1,0]`
> - The executive asks for **three** replication guides, gets `[1,1,0]` from the top of the stack, pops them.
> 
> - We’re back at state 1.

So the part of Dynamo which executes your code has to fill out the replication guides on each run, but as you’re providing only 2/3 inputs you get a hanging list that gets added to the next time you run it. On the good news front there is [already work underway](https://github.com/DynamoDS/Dynamo/pull/16594/files) to resolve this issue. Unfortunately this will only apply the fix in a future Dynamo release, so you’ll have to use a work-around for now. Fortunately the work-around isn’t too difficult - always apply the 3rd input and utilize the replication guides on each input.

By providing the missing input (`true`) and the results come consistently. So using `String.Contains(lst<1>,"Width", true);` should resolve your issue consistently, and if you find out otherwise, please let us know. 🙂

---

<div class="post-metadata">

**Author:** ![luis.rivera](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@luis.rivera](https://forum.dynamobim.com/u/luis.rivera)\
**Post date:** [October 16, 2025, 7:58pm UTC](https://forum.dynamobim.com/t/inconsistent-behavior-with-replication-guides/112639/10 "2025-10-16T19:58:22Z")

</div>

Fix is now available on [dynamobuilds.com](http://dynamobuilds.com/) daily builds, since version [4.0.0.2885](https://downloads.dynamobuilds.com/DynamoCoreRuntime_4.0.0.2885_20251016T1746.zip) . Thanks for the heads up to track and find this bug! For older versions, the workaround is to just fill all default parameters as Jacob mentioned.
