Placing dimensions from an air terminal in a space to the closest separation line or space boundary

Hello, I’m trying to make a script to automatically place dimensions between an air terminal in a space to the nearest separation line or space boundary (in X and Y direction).

I have a problem with placing lines from the air-terminal to the nearest separation line.

The biggest issue is that I don’t know where to find the reference of the “separation lines” or “space boundaries” to connect to a dimension-node.

Many thanks in advance for your feedback

Hello @johanQZGZ7 and welcome, you could try with genius loci dimension nodes, and get your reference from airterminal, with family_origin_reference node, and for separation line, you could use element reference node, and the line for placement, you could try Geometry.ClosestPointTo and create a line from these points, and pull it on viewplane, thats could be a start…here is one example