Auto-Dimension from Walls



Hi All,

Just a WIP incase anyone has a free Sunday and fancies a play with it! Otherwise I’ll get back on it on Monday…

Following the amazing work here:

I want a graph which will create individual dimensions (so I can check them against brick dimensions) and automatically create the dimension location lines.

So far I’ve got here… It’s nearly there, but rather than create a dim per ‘reference’ it’s creating a dim per line… It’s also doing something weird with the view… The created dims are in Revit but not appearing until I change their type.

Any assistance appreciated!



auto dim walls-14.dyn (38.9 KB)

import clr
from Autodesk.Revit.DB import *

import Revit

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#create a for loop to go through every index
b = IN[0]
elements = IN[1]
dim = 0
a = []

for x in range (0, len(b)):

	line = UnwrapElement(b[x]).GeometryCurve
	elementsRef = ReferenceArray()
	opt = Options()
	opt.ComputeReferences = True
	opt.IncludeNonVisibleObjects = True
	opt.View = doc.ActiveView
	for element in elements:

	dim = doc.Create.NewDimension(doc.ActiveView, line, elementsRef).ToDSType(True)

	d = dim
	a.extend ([d])

	OUT = a

Create dimensions
Getting Geometry of wall openings of walls at an angle

Minor update, the springs.list.subpairs node is awesome!


So this is where I’m leaving it for the moment… putting the python in a custom node let me work at level 2, so if I Pick a wall I get all the dimensions along it offset automatically.

If I get more time I’ll keep working on it…

Any assistance welcome!


DimWallsAuto-Chop.dyn (46.8 KB)
Dim.FromReference.dyf (5.1 KB)

How can i put aligned dimension and angular dimensions in floors?

Just an update, I’ve got it working for multiple walls in active view and removed the need for a custom node by updating my python.

Thanks to all who’s work I have built upon,


It struggles with angled corners as you’d need a reference ‘point’ rather than plane, any suggestions welcome :slight_smile:
EDIT: It’s also using the angle of the wall to work out which should be dim’d, so I’d need to get only the wall faces which are vertical and not aligned to the location line, then pick the point closest to the location line which intersected the external face… simples… Getting the ‘point’ might be the easy bit!

DimWallsAuto-All.dyn (64.7 KB)

Python Dimension.Below = calculated value based on actual Dimension value(Maths)

It is just an Idea that I haven’t tested. Can’t you take start and end of the wall as references?


Hi :slight_smile:

Thanks for the response!

So… My dimension wouldn’t want to be from the End Point of the location line… Otherwise it would be too short…
Unfortunately the relationship between references and geometry seems very easily broken, I would need an actual point on the wall corner somehow…

I could make a dimension to a reference plane, but it wouldn’t be dynamic, or I could extract a corner point from the geometry of the wall, but it then loses it’s association.

Thanks again,