How to determine the centerline of a beam


Hello everyone, I am creating a beam from a CAD file, after inserting 2 straight lines of the beam, I created 4 points, 2 starting points and 2 ending points, I want to determine 2 short edges created by 4 points of a beam and get the coordinates of the midpoint of the 2 short edges and then connect them into 1 axis of the beam. I don’t know if that’s possible, I hope everyone can help, thank you everyone for reading the article.

How about this?

probably you more after Element.GetActualLocation..


Thanks for your reply, but the problem here is that I want to create a beam from 2 straight lines running parallel to the beam, which are the 2 outer lines of the beam, and I want to find the center line between those 2 lines to place the beam along the center line, not place the beam on a line.

Thanks for your reply, could you please see the photo below?

Curve.PointAtParameter > List.Flatten > Line.ByBestFitThroughPoints

1 Like

arhh if i understand :wink: i would first pair these lines up there are parallel, and again by distance, create a surface by loft and then use isolines at 0,5

5 Likes


Great, I understand your way of doing it is to group lines with distance < 1500 and then divide, but if the case is 2 beams beveled together like the picture, it seems that it cannot be grouped, right?

Thank you very much, I will try your way to see the results.

thats should the group line parallel node from genius loci handle…have you tried ?

1 Like

Thank you very much, I will try your way.

I tried your way, the result is great, thanks again for helping me

1 Like



Hi, I’m having the following trouble while testing Dynamo this problem, can you give me some advice on this case, I don’t understand why but the red beam can’t create surface and center lines like the green beams, thank you very much

yeah as i always say many things can go wrong when work with cad in revit…but in the end its just about sorting :)…here is a post there probably could give inspiration…Create Beams From CAD works only perpenticular geometry - #24 by arincakkin, and there should many other examples here in the forum, where you can see how many things there can go wrong, and we need sort deeper or another way,depends, so play around with it :wink: :wink:

I am using RV 2023, I tried to solve the problem but it is really stuck


I checked and the lines are parallel in pairs but it can’t create a plane and then give the center line.

1 Like

yeps a lot can go wrong :wink: :wink: try share you cad and can take a look next week, im on my way to copenhell, and there is not so much dynamo :wink: ;)…but sometimes i have recived some cad files where there are so messy, so the time i put in it cant match the time, if the cadfolks just create centerlines on own layers…

I have cleaned the file and separated it into 2 different layers, if you have time please help me see it, I appreciate you very much, I have left the file below

S-012-001_Structure plan.dwg (376.0 KB)
This is my CAD file.