Resize a beam (Structural Frame) using a baseline

Hello everyone,

I would like to once again rely on your collaboration to help me with a question I have regarding resizing beams (Structural Frame) based on new lines.

In an attempt to achieve my goal, I created a routine in Dynamo to read the new lines and allow the “ELEMENT.SETLOCATION” command to understand this new resizing and update the corresponding beams (Structural Frame). Unfortunately, it didn’t work out, as all connected beams remained unchanged. Please see the image below.

Note that the image demonstrates that the two beams that are “free/not connected” resized, however, the connected beams did not.

So, does anyone have any suggestions on how to adjust the length of the beams based on these new lines?

Thank you all for your attention in advance.

It may be due to the ends remaining joined. So you will have to unjoin the ends first, then resize the beams.


Thank you for your contribution, and I also thought about the same thing. However, how do we solve this in Dynamo? How can we disconnect the ends and then reconnect them?

It’s important to mention that I can’t just delete the beams and redraw them because I would lose important information such as tags and dimensions. And since I have a project with over 150 beams, the rework would be substantial.

Hello, you can dig on this side



Hello @christian.stan,

Thank you very much for your contribution and the time you took to respond to this post. Well, the action of disconnecting the elements worked (image_1), but I still couldn’t resize the beams.

Notice that in image_2 it shows that the beams are supposedly disconnected, however, in image_3 when moving the beam, the elements remain “welded/connected”.

After studying this problem a bit more, I believe I need to change the Star_Point and End_Point of the beam via Python/API to resize it. Can anyone help me with this? Or is there another process I could apply?

I already appreciate everyone’s attention.

1 Like

This is just a shot in the dark. Right click over the drag-points and see if disallow join is an option, if so turn that off on all end points. Then try re-running the script and see what happens.


hi, Look at the DisallowJoinatEnd method of the StructuralFramingUtils Class



Thank you once again for your support, and I am following your suggestions (@staylor and @christian.stan ). Although I don’t have much experience in Python programming, I dared to write some code related to the DisallowJoinatEnd method. I managed to make it work, but my list ends up empty when I try to associate it with beams/structural frames. I confess I’m unsure where I’m going wrong. Could you please help me? Below is the code I developed.

import clr
clr.AddReference(‘RevitServices’) # Adds reference to RevitServices
clr.AddReference(‘RevitAPI’) # Adds reference to RevitAPI
from RevitServices.Persistence import DocumentManager
from Autodesk.Revit.DB import Transaction, FamilyInstance, FilteredElementCollector

doc = DocumentManager.Instance.CurrentDBDocument

beams = IN[0] # List of beams provided as input

modified_elements =

for beam in beams:
# Check if the element is an instance of a structural framing
if isinstance(beam, FamilyInstance):
# Disables the join at the end of the beam
# Adds the modified beam to the list of modified elements

OUT = modified_elements

I understand this is beginner-level code, but I’m trying my best to learn.


hi, I will give you a more reasoned answer through an example at the end of the afternoon
You already miss him:

import Autodesk
from Autodesk.Revit.DB import*
from Autodesk.Revit.DB.Structure import*

to have access to the StructuralFramingUtils class
you can also separate the two ends
and put it all into a transaction

I learned with and the many advice from forum members
and I’m still learning



EDIT: Just to verify, did you manually do the disallow join and run the script to see if that was actually the problem?

You making the effort and trying to code it yourself, gets received very well by everyone here. Nice work!! We are definitely more willing to help those who help themselves versus those who are looking for someone to do their work for them.

This code will do both ends of all inputted elements and return the elements after done. You can use this for reference for your code or just copy it directly.

import clr

from Autodesk.Revit.DB.Structure import *

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])]


for e in element:


OUT = element

Hello everyone,

I would like to share that it was essential for the success of the Python code using the UnwrapElement method. I confess that I was not aware of this option, and that’s why I appreciate the tips posted here on the forum. Now, finally, I can say that the code is working as expected. In addition to using the DisallowJoinAtEnd method, I also implemented the AllowJoinAtEnd method at the end of the routine.

The context that motivated me to create this post is my current demand for projects in the native IFC format. When inserting the IFC into REVIT, I proceed with all the necessary documentation, including sections, tags, dimensions, and tables. However, I face difficulties when there are revisions to the structure of the IFC file, as I cannot update the model in REVIT, resulting in various documentation problems, such as incorrect tags, dimensions, plan failures, among others.

To overcome this obstacle, I developed a method that compares data extracted from two TXT lists, one originating from the original IFC file and the other from the revised file. This comparison is performed using Dynamo/Python, and the script presented in this post is the final result of this routine, which has proven to be effective. To give you an idea of the magnitude of the challenge, just to review the beams, more than 150 iterations are required.

I would like to express my gratitude to collaborators @staylor and @christian.stan , whose dedication and promptness were crucial to the success of this project. You guys are awesome! Thank you very much to everyone, and I consider this post successfully concluded.

1 Like

Hello @staylor ,

Thank you very much for your kind words, especially coming from someone with so much experience. I feel truly honored.

I learn a lot here on the forum and I do my best to develop my routines.

In the future, my goal is to become an Autodesk ADN. Who knows?

Thank you.


Hello @christian.stan ,

Your tip was crucial for the success of the script. Thank you very much for your contribution.
Thank you.

1 Like