# Slightly sloped columns and beams

**URL:** <https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226>\
**Category:** Revit\
**Created:** [October 17, 2024, 6:57pm UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226 "2024-10-17T18:57:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![diego.mata.pose](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@diego.mata.pose](https://forum.dynamobim.com/u/diego.mata.pose)\
**Post date:** [October 17, 2024, 6:57pm UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226/1 "2024-10-17T18:57:04Z")

</div>

Hi dynamomatters!

I write this post cause i’m having several problems on creating a grid of columns and beams I still don’t identify

I’m writting a dynamo script to automatically model a simple modular house foundation that consists on some columns that support home skeleton and transmits their loads on some foundation beams directly placed on terrain

Ok, I’ve programed the script succesfully in concept: The inputs in the dynamo environment seem to be ok but, in practise, Revit interface shows columns and beams slightly sloped at the point that the building breaks rectangular floor plan onto two rectangles, even although the lists of provided points that should build this elements are ok (i’ve checked them)

For example, in that point, beam becomes sloped trying to get connected with columns start points, as shows:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/f/6f933c0feecef25871fe0d3e4ff0a5c477be2d4e.png)  
I know that beam elements in revit has an odd behavior some times but i don’t know if it could be posible to solve it or should I settle for this situation

What do you think?

Many thanks again,

Diego

---

<div class="post-metadata">

**Author:** ![diego.mata.pose](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@diego.mata.pose](https://forum.dynamobim.com/u/diego.mata.pose)\
**Post date:** [October 17, 2024, 7:06pm UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226/2 "2024-10-17T19:06:08Z")

</div>

Use this link [Unique Download Link | WeTransfer](https://we.tl/t-olhkSJuhdV) to get the .rvt file and the script i’m writting if you want to check. Note that selecting steel frame structure is needed to generate a new foundation

---

<div class="post-metadata">

**Author:** ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)\
**Post date:** [October 17, 2024, 7:16pm UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226/3 "2024-10-17T19:16:12Z")

</div>

Please show what the preferred outcome needs to be so that we can understand what you are wanting and guide how to get there.

---

<div class="post-metadata">

**Author:** ![diego.mata.pose](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@diego.mata.pose](https://forum.dynamobim.com/u/diego.mata.pose)\
**Post date:** [October 17, 2024, 8:58pm UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226/4 "2024-10-17T20:58:13Z")

</div>

Yeah, sorry cause perhaps i didn’t explain myself in a good way  
Previous picture is the current result of my script (attached with my previous comment) and this image

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4e3c2d1245067978376425693f14dd2a2ba1e14d.png)  
Would be de desiderated result with the middle beam just vertical and aligned with others. Find in this link [Unique Download Link | WeTransfer](https://we.tl/t-CuHohkUrFh) this ‘wanted’ versión (although some columns still are not completely vertical) and a simplified versión of the script if you want to check it in a easiest way

---

<div class="post-metadata">

**Author:** ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)\
**Post date:** [October 18, 2024, 3:27am UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226/5 "2024-10-18T03:27:43Z")

</div>

try this one

  
[AlignUnparalleledLines.dyn](https://forum.dynamobim.com/uploads/short-url/flysHHxidf5Kpq6SosOm8JgwyoU.dyn) (56.4 KB)

---

<div class="post-metadata">

**Author:** ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)\
**Post date:** [October 18, 2024, 12:17pm UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226/6 "2024-10-18T12:17:08Z")

</div>

Try what @jmark suggested and see if that works for you. What also may be an issue is with the grips at the ends of the beams by default being set to “Allow Join”. So all of the beams are connecting at the center of the columns. If that is the case, then below will help with that. You can feed a list of beams into the python script if needed. Also, you may have to run this, before you run @jmark tool.

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

```auto
import clr

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

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

element = UnwrapElement(IN[0]) if isinstance(IN[0],list) else [UnwrapElement(IN[0])]

TransactionManager.Instance.EnsureInTransaction(doc)

for e in element:
    StructuralFramingUtils.DisallowJoinAtEnd(e,0)
    StructuralFramingUtils.DisallowJoinAtEnd(e,1)

TransactionManager.Instance.TransactionTaskDone()

OUT = element

```

---

<div class="post-metadata">

**Author:** ![diego.mata.pose](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@diego.mata.pose](https://forum.dynamobim.com/u/diego.mata.pose)\
**Post date:** [October 20, 2024, 3:57pm UTC](https://forum.dynamobim.com/t/slightly-sloped-columns-and-beams/105226/7 "2024-10-20T15:57:07Z")

</div>

Hei @jmark, @staylor!

Sorry, I was a few days without the computer and I wasn’t able to check your ideas. Many thanks for commenting

Efectively beams were set by default to “allow join” and they connected automatically their start and end points with the center of the columns

@staylor, your Python node works perfectly in my script. Many thanks for sharing it!

@jmark, thank you also for your help although maybe the code-written node fits better in my workflow

I let the final versión of my script if anybody is curious

See you at forums!  
Diego  
[script02\_CIMENTACIÓN.dyn](https://forum.dynamobim.com/uploads/short-url/lqDvhXt6n1N0gc3uEZfx9eOYHVm.dyn) (548.2 KB)
