Wall lengths between openings, door frames, etc

Working on a script that measures the center of a wall section to an origin point or grid location we define in a project. I’ve run into a challenge where wall openings and doors aren’t detected due to what Revit records for my script. I’m using a Element.GetLocation, and curve.PointAtParameter to determine the center of wall now. How would I detect openings, and split the wall to follow the base openings at the floor level? Is this even possible?
The image below, my script picks up where the red datum is (arrow pointed) but the places I really need to locate are circled. The wall is modelled continuous with a wall opening placed at the break.
Do analytical lines follow these openings? Am I just simply stuck?

Any help or ideas here would be greatly appechiated!

There’s hope on the analytical model! Anyone use these for pulling wall data? Mainly need dimensional centers between openings.

One idea for this is to take the center lines of the walls and intersect them with something derived from the doors and windows. what i have done for something like this in the past is to grab the center point of the doors/windows and create a cylinder at the width of the overall opening, you can then intersect and split the line generated from the walls with the new cylinder geometry created. you could then analyze the split curves to for midpoints and locations.

1 Like

I was wondering about that, or simply reading the opening sizes, divide by 2, but it’s just past what I know how to do. I’m seeing the wall analytic is recorded as a analytical wall, so going to chase this for a bit and see how it works. I struggle when I have to convert objects with Dynamo still, dont have a good understanding what a cuboid is vs a mass element, etc…

I believe if you generate the cylinder as a cuboid object you should be able to intersect and split a line with that cuboid


Made pretty good progress, but have some code warnings, even though it functions. I just created instances at all the filtered points midpoint of the analytical wall lines I think I want and it seems to work as long as the walls are on a level floor, I can adjust the .Z filter, but that can be my problem down the road, I’ll bump it to 6" to cover stem walls, etc…

Just to come back full circle on this. AnalyticalWalls have a ELEMENTID +1 of the wall they’re associated with. So I used a selection set with the Analytical Walls and the Walls on, then filter by ELEMENTID of the wall +1. Then I grab the Wall base constraint and any offset to the base to determine what elevations of analytical walls are are the base level on the floor, this provides the output of analytical wall lines for the active view selected by the user.

So far I’ve tested 3 different projects (All as the only user in the project, worksharing will not be as relaible!)