# Auto Wall Top Offset from Beam

**URL:** <https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [February 23, 2026, 5:02pm UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008 "2026-02-23T17:02:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravishankar.unipune](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ravishankar.unipune/32/157492_2.png) [@ravishankar.unipune](https://forum.dynamobim.com/u/ravishankar.unipune)\
**Post date:** [February 23, 2026, 5:02pm UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/1 "2026-02-23T17:02:03Z")

</div>

Hi, I am working on a Dynamo script to adjust wall geometry. Hence,

[ARCH\_R24.rvt](https://forum.dynamobim.com/uploads/short-url/sAAF2ig7MGN71pdgFL70wnHADso.rvt) (5.9 MB)

[04.1 -Beams With Walls.dyn](https://forum.dynamobim.com/uploads/short-url/5n2X5UleFO1Qa564PfjIaPykMSB.dyn) (73.5 KB)

[STR\_R24.rvt](https://forum.dynamobim.com/uploads/short-url/45NQSWknbwrQ6N9yLbShObNMDso.rvt) (9.6 MB)

The wall top/profile conforms to the underside or boundary of linked structural beams, ensuring accurate coordination between architectural and structural models.

I am not able to run it correctly due to an error in the geometry intersection. Please find the attached model and also the Dynamo script.

Please help me to resolve this issue

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [February 24, 2026, 5:10am UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/2 "2026-02-24T05:10:51Z")

</div>

try something like this. try same as for link elements.

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

[link.dyn](https://forum.dynamobim.com/uploads/short-url/z5AiWjPbMFzEgNUb0nT2OlW7ih7.dyn) (19.5 KB)

---

<div class="post-metadata">

**Author:** ![ravishankar.unipune](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ravishankar.unipune/32/157492_2.png) [@ravishankar.unipune](https://forum.dynamobim.com/u/ravishankar.unipune)\
**Post date:** [February 24, 2026, 6:50am UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/3 "2026-02-24T06:50:03Z")

</div>

Hi Vijay

Thanks for sharing the script.  
I tried it on my side, but it is not working. I also connected the remaining required node. Please have a look at the attached Dynamo file and screenshot.

[link.dyn](https://forum.dynamobim.com/uploads/short-url/kuMluT6qZLmeIM1qoKsMCMb2f54.dyn) (21.5 KB)

 ![link_2026-02-24_12-14-16](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/8/e895c60380abaf381c899f64bcb2c186f298c763.png)

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [February 24, 2026, 7:13am UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/4 "2026-02-24T07:13:05Z")

</div>

What do the **warnings** say?

Especially the for the first node.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [February 24, 2026, 9:32am UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/5 "2026-02-24T09:32:29Z")

</div>

I guees you need current document before Document.GetLinkInstances…maybe

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [February 24, 2026, 12:15pm UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/6 "2026-02-24T12:15:36Z")

</div>

@john_pierson any idea how this works for linked Elements,

its work perfect for current document Elements.

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

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [February 24, 2026, 12:53pm UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/7 "2026-02-24T12:53:14Z")

</div>

but this should help you,

```auto
import clr
import System

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

doc = DocumentManager.Instance.CurrentDBDocument

# INPUTS
host_elements = UnwrapElement(IN[0])
link_instance = UnwrapElement(IN[1])
linked_elements = UnwrapElement(IN[2])

if not isinstance(host_elements, list):
    host_elements = [host_elements]

if not isinstance(linked_elements, list):
    linked_elements = [linked_elements]

# Get link transform
transform = link_instance.GetTransform()

results = []

for host in host_elements:

    host_solids = []
    geo = host.get_Geometry(Options())

    for g in geo:
        if isinstance(g, Solid) and g.Volume > 0:
            host_solids.append(g)

    if not host_solids:
        results.append([])
        continue

    intersecting = []

    for linked in linked_elements:

        linked_geo = linked.get_Geometry(Options())

        for g in linked_geo:

            if isinstance(g, Solid) and g.Volume > 0:

                # Transform linked solid into host coordinate system
                transformed_solid = SolidUtils.CreateTransformed(g, transform)

                for host_solid in host_solids:

                    try:
                        intersection = BooleanOperationsUtils.ExecuteBooleanOperation(
                            host_solid,
                            transformed_solid,
                            BooleanOperationsType.Intersect
                        )

                        if intersection.Volume > 0:
                            intersecting.append(linked.ToDSType(True))
                            break

                    except:
                        pass

                else:
                    continue
                break

    results.append(intersecting)

OUT = results

```

 ![link_2026-02-24_06-22-57](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/6/560ab1f39f81da5cd4d87f084c0f46eb8a201a5f.png)  
[link.dyn](https://forum.dynamobim.com/uploads/short-url/tbYIhQBR1y1Xecsssyjmz3hqqfT.dyn) (28.3 KB)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [February 24, 2026, 4:24pm UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/8 "2026-02-24T16:24:17Z")

</div>

sourceInstance = revitLinkInstance i believe.

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [February 25, 2026, 1:43am UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/9 "2026-02-25T01:43:13Z")

</div>

Tried, did not worked as expected!

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [February 25, 2026, 12:30pm UTC](https://forum.dynamobim.com/t/auto-wall-top-offset-from-beam/114008/10 "2026-02-25T12:30:57Z")

</div>

Hm, I will have to take a look
