# Replace branch

**URL:** <https://discourse.mcneel.com/t/replace-branch/210456>\
**Category:** Grasshopper\
**Tags:** windows, data-tree\
**Created:** [October 1, 2025, 5:13pm UTC](https://discourse.mcneel.com/t/replace-branch/210456 "2025-10-01T17:13:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danniil\_N](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danniil_n/32/634817_2.png) [@Danniil\_N](https://discourse.mcneel.com/u/Danniil_N)\
**Post date:** [October 1, 2025, 5:09pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/1 "2025-10-01T17:09:45Z")

</div>

Does anyone know if there’s an easier way to replace tree branches? Maybe there’s a special node?

---

<div class="post-metadata">

**Author:** ![Japhy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/japhy/32/487647_2.png) [@Japhy](https://discourse.mcneel.com/u/Japhy)\
**Post date:** [October 1, 2025, 5:10pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/2 "2025-10-01T17:10:53Z")

</div>

Replace Paths is probably what you are looking for, Tree Branch can also be set to Renumber..

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/6/0/6603560877255de742391b299f22e3a648787c7a.png)

---

<div class="post-metadata">

**Author:** ![Danniil\_N](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danniil_n/32/634817_2.png) [@Danniil\_N](https://discourse.mcneel.com/u/Danniil_N)\
**Post date:** [October 1, 2025, 5:13pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/3 "2025-10-01T17:13:04Z")

</div>

Does anyone know if there’s an easier way to replace tree branches? Maybe there’s a special node?

 ![replace branch](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/d/1/cd1a80fb3a2818093707d3c4458ca3c43e51008c.png)

---

<div class="post-metadata">

**Author:** ![inno](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/inno/32/544036_2.png) [@inno](https://discourse.mcneel.com/u/inno)\
**Post date:** [October 1, 2025, 5:45pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/4 "2025-10-01T17:45:24Z")

</div>

I think the one you have shown in the screenshot is the most viable method

---

<div class="post-metadata">

**Author:** ![Ali\_Najmaei](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ali_najmaei/32/636031_2.png) [@Ali\_Najmaei](https://discourse.mcneel.com/u/Ali_Najmaei)\
**Post date:** [October 1, 2025, 5:45pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/5 "2025-10-01T17:45:53Z")

</div>

We use `Replace Path` to do this stuff so it’s kind of the most convenient way

---

<div class="post-metadata">

**Author:** ![Adam\_M](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/adam_m/32/769331_2.png) [@Adam\_M](https://discourse.mcneel.com/u/Adam_M)\
**Post date:** [October 1, 2025, 7:23pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/6 "2025-10-01T19:23:04Z")

</div>

If Python in an option for you, you could do something like this:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/6/6/a66514d8bd88cc3b21886f7c4db1ebe41672b85e.png)

```python
from Grasshopper.Kernel.Data import GH_Path

for p, i in zip(tr2.Paths, br):
    np = GH_Path(int(i))
    tr1.RemovePath(np)
    tr1.AddRange(tr2.Branch(p), np)

a = tr1

```

---

<div class="post-metadata">

**Author:** ![Danniil\_N](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danniil_n/32/634817_2.png) [@Danniil\_N](https://discourse.mcneel.com/u/Danniil_N)\
**Post date:** [October 1, 2025, 7:48pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/7 "2025-10-01T19:48:47Z")

</div>

Good work man! So simple, strange that there is no preinstalled node for this for people who doesnt know phyton

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [October 1, 2025, 8:02pm UTC](https://discourse.mcneel.com/t/replace-branch/210456/8 "2025-10-01T20:02:34Z")

</div>

> [@Danniil\_N](#):
>
> strange that there is no preinstalled node for this for people who doesnt know phyton

Seems a little strange to me that you need the capability at all.
