# Design Script's ambiguous and versatile Replication Guides <1>

Here we will explore the role that Replication Guides play in building *associations* between elements while using [*Design Script*](https://primer.dynamobim.org/07_Code-Block/7_Code-Blocks-and-Design-Script.html) in [*Dynamo*](https://dynamobim.org/) Code Blocks.

While I've been fascinated by the magic of replication guides for many years now, I haven't really attempted to explain it's workings to even myself. I've got it to work mostly by intuition and many a time by trial and error. However, I'm going to pretend like I know what I'm talking about and invite you to participate in this charade.

<figure><img src="https://media.licdn.com/dms/image/C5612AQFeXnvHHqQ0QA/article-inline_image-shrink_1500_2232/0/1610602383787?e=1717632000&#x26;v=beta&#x26;t=RJ_RHkQxG9Z8DmCbir3oFFt_-jBiW3Z6p5ao2vci7jQ" alt="No alt text provided for this image"><figcaption></figcaption></figure>

The curtains rise and **I** *(a)* am deep in thought, seated at a table.

Kindly note that the colorful sliced sandwiches that make their appearance from time to time, however appetizing they might seem, are only props.

<figure><img src="https://media.licdn.com/dms/image/C5612AQFjF04uH3PZNg/article-inline_image-shrink_1500_2232/0/1610011738650?e=1717632000&#x26;v=beta&#x26;t=JccCWykzqVgqztyPoExdvinaDZ5xKOqu-BfGPKo0MnU" alt="Sandwich graphics illustration"><figcaption></figcaption></figure>

<figure><img src="https://media.licdn.com/dms/image/C5612AQExL2Ks4k_OwA/article-inline_image-shrink_1500_2232/0/1610169939304?e=1717632000&#x26;v=beta&#x26;t=9DeVYHU9s-E4ssPgZWalYHP2QAJCHut3G4E4O1uk_r0" alt="Design Script in Dynamo Code Block"><figcaption></figcaption></figure>

Contemplating.

**I** *(a)* am *Thinking* *(1)*

A + B = **I** *Thinking*

<br>

Apparent and straight forward so far, I suppose. But what am I thinking?

<figure><img src="https://media.licdn.com/dms/image/C5612AQF1QyPncmu-IQ/article-inline_image-shrink_1500_2232/0/1610165475092?e=1717632000&#x26;v=beta&#x26;t=PNFxQ90F9_f01cgFKkymzbfOMrKnhqGwmCYj8uStFh0" alt="Sandwich Graphic Illustration"><figcaption></figcaption></figure>

Pleasant Thoughts.

**I** *(a)* am *Smiling* *(2)*

A + B =

**I** *Thinking,* **I** *Smiling*

Still fairly apparent, I hope.

The *Thinking* *(1)* **I** *(a)* am now joined at the table by a *Smiling* *(2)* **You** *(b)*.

<figure><img src="https://media.licdn.com/dms/image/C5612AQGrdbtX4QcAGQ/article-inline_image-shrink_1500_2232/0/1610297816585?e=1717632000&#x26;v=beta&#x26;t=hhTVBI4TkcCU4ZwD9UgkxqMQD1lxjfH6ObmDoxK-h5Q" alt="Design Script in Dynamo Code Block"><figcaption></figcaption></figure>

Interrupted ? Maybe not.

A + B =

**I** *(a)* *Thinking* *(1),* **You** *(b) Smiling* *(2)*

<figure><img src="https://media.licdn.com/dms/image/C5612AQF2OiMOJbepfQ/article-inline_image-shrink_1500_2232/0/1610011871016?e=1717632000&#x26;v=beta&#x26;t=kWKRW8gurF9C-8TupL57jM6zvVELw7FqTEHKDQ3jYtA" alt="Sandwich Graphic Illustration"><figcaption></figcaption></figure>

But the *Thinking* **I** and the *Smiling* **You** aren't being adequately expressive. While **I** might be pleased with **You** joining the table and probably still *Smiling*, it isn't explicitly represented above. The stage is now set for our protagonist to make an entry and make such associations possible.

#### Replication Guides < > <a href="#ember1537" id="ember1537"></a>

<figure><img src="https://media.licdn.com/dms/image/C5612AQHpoOLw0LtRqA/article-inline_image-shrink_1500_2232/0/1610303806228?e=1717632000&#x26;v=beta&#x26;t=V_uOzQQsHZbFuI87Qi4Nwm_ILjxQiAQ1iajL0_sGrRg" alt="Design Script in Dynamo Code Block"><figcaption></figcaption></figure>

A <1> + B =

**I** *(a)* *Thinking* *(1),* **I** *(a)* *Smiling* *(2)*

**You** *(b)* *Thinking* *(1),* **You** *(b) Smiling* *(2)*

<figure><img src="https://media.licdn.com/dms/image/C5612AQFkHY7vc_dpDw/article-inline_image-shrink_1500_2232/0/1610302678145?e=1717632000&#x26;v=beta&#x26;t=H6XFrHJKrd2NEbAb38KrMh-l3geFXHEPFXFEcb-mpvA" alt="Sandwich Graphic Illustration"><figcaption></figcaption></figure>

Introducing <1> after A, pairs each element of A with every element of B. If it follows B instead, the structure of the result is altered. The *Transpose* of the earlier result is obtained.

<figure><img src="https://media.licdn.com/dms/image/C5612AQEVY2iplIezMw/article-inline_image-shrink_1500_2232/0/1610303842107?e=1717632000&#x26;v=beta&#x26;t=konZSFnHY70qwp-oP6TwEs9hWm6uHn-35vgXBXEVTr0" alt="Design Script in Dynamo Code Block"><figcaption></figcaption></figure>

A + B <1> =

**I** *(a)* *Thinking* *(1),* **You** *(b)* *Thinking* *(1)*

**I** *(a)* *Smiling* *(2),* **You** *(b)* *Smiling* *(2)*

<figure><img src="https://media.licdn.com/dms/image/C5612AQGCX_ggGqai4w/article-inline_image-shrink_1500_2232/0/1610011939973?e=1717632000&#x26;v=beta&#x26;t=Gx3Sb9rTXPHZbEymi3nRbE6NT7RwcrBO5LjMFys5BGE" alt="Sandwich Graphic Illustration"><figcaption></figcaption></figure>

Lots of thinking and smiling, but to what end? The objective of such an exercise is to extract a selected few sandwiches from a generated stack of sandwiches while always trying to minimize the size of the overall sandwich stack from which the few are extracted.

We are now joined on stage by a *Sitting (3)* **Cat** *(c)* and a *Standing (4)* **Dog** *(d)* and that could mean more sandwiches.

```
A + B
```

<figure><img src="https://media.licdn.com/dms/image/C5612AQHSPs_VFE-A0w/article-inline_image-shrink_1500_2232/0/1610374023262?e=1717632000&#x26;v=beta&#x26;t=5VwqcYC_jIYzUF94_f3tYypBqTLgaTSnTihBVRev9wI" alt="Sandwich Graphic Illustration and Dynamo Graph"><figcaption></figcaption></figure>

<figure><img src="https://media.licdn.com/dms/image/C5612AQFASGxsu1HaBg/article-inline_image-shrink_1500_2232/0/1610601543943?e=1717632000&#x26;v=beta&#x26;t=0y8LUOEoAWvhp6hbOeMo_npIAU0_RDuqsn9mg7CKHMU" alt="His Masters Voice logo. Jack Russel terrier listening to a gramaphone"><figcaption></figcaption></figure>

**I** *(a)* imagine the **Dog** *(d)* to be Nipper, the Jack Russel Terrier from 'His Master's Voice' and that puts a smile on my face.

We would now need a *Sitting (3)* **Dog** *(d)* and *Smiling (2)* **I** *(a)* to capture this picture. That means, even more sandwiches.

<br>

```
A <1> + B  and  A + B <1>
```

<figure><img src="https://media.licdn.com/dms/image/C5612AQFV2xhJxFImkw/article-inline_image-shrink_1000_1488/0/1610374589075?e=1717632000&#x26;v=beta&#x26;t=lTEe_qZCOTSvhyhZW8XIQrV83KceRe8kYUVT05_6gFo" alt="Sandwich Graphic Illustration and Dynamo Graph"><figcaption></figcaption></figure>

So far, **You** *(b)* and **I** *(a)* have been in a world separate from the **Cat** *(c)* and **Dog** *(d)*. Our activities and emotions seem to be mutually exclusive. But Nipper is a *Thinking* *(1)* **Dog** *(d)* and **You** *(b)* are *Sitting (3)*, probably bored and exhausted by no&#x77;*.* To capture this we would need to bridge the two worlds with a chain (*<1><2>*) of Replication Guides.

```
A <1> <2> + B   and   A + B <1> <2>
```

<figure><img src="https://media.licdn.com/dms/image/C5612AQFbop3Po6Psnw/article-inline_image-shrink_1000_1488/0/1610425403157?e=1717632000&#x26;v=beta&#x26;t=6jN_U3sfkjbLjmDxnZsXe_P2uE3gRM7DYNQAR1qxu7w" alt="Sandwich Graphic Illustration and Dynamo Graph"><figcaption></figcaption></figure>

We could take this further (and further more). Imagine **You** and **I** are out on the streets, walking our **Cat** and **Dog**. We *Smilingly* greet others (**Him, Her, Them**) who are also enjoying the pleasant weather *Sitting* on benches, maybe.

With some orderly selection and grouping we should be able to intelligibly capture all this. Identifying, Capturing and Organizing data would be the first step (there could also be sleeping monkeys or frowning people present, but they are of no interest to us and will be ignored), followed by optimally obtaining combinations with Replication Guides (with a longer chain *<><><>* maybe) and filtering out those undesired.

Lets hope all involved behave as expected and the weather remains pleasant. Unpredictable behavior, like unpleasant weather can cause chaos.

<figure><img src="https://media.licdn.com/dms/image/C5612AQHp6BE5KlO5Tg/article-inline_image-shrink_1000_1488/0/1610606894402?e=1717632000&#x26;v=beta&#x26;t=EcSX03ULaOhTdiLnqN2HcuuGmvSNH5Skz1aMxd6tTnY" alt="Very unpleasant Weather, painting by George Cruikshank. Raining cats, dogs and pitch forks"><figcaption></figcaption></figure>

I'll bring down the curtains on this explanation of my understanding of one aspect (association) of Replication Guides with a word of caution. While numerous combinations will be possible with different configurations of Replication Guides (which might be good to explore and go overboard with while getting a grasp of the concept and its workings), it would be wise to eventually keep it as simple as possible and avoid unnecessary depth and complexity by first cleaning up and properly organizing the initial inputs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.testingwaters.in/articles/design-scripts-ambiguous-and-versatile-replication-guides-less-than-1-greater-than.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
