Get column dimensions with Python



With Dynamo I can get the column height dimensions in this manner, which worked great;

However I have the preference to use Python instead, so I made this script (Note, this is RevitPythonShell and not the Python Node, hence the minor differences);

options.View = doc.ActiveView
#options.OtherOptions = other values

structural_column_collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_StructuralColumns)
structural_column_instances = structural_column_collector.OfCategory(BuiltInCategory.OST_StructuralColumns).WhereElementIsNotElementType()


for i in structural_column_instances:
	element_type = doc.GetElement(i.GetTypeId())
	parameters = element_type.Parameters

	print i.GetOriginalGeometry(options)

Now at this part I got stuck where to acces the faces and topology etc. At this moment I thought there might be an easier way to acces the dimensions of a column. If I select a column in Revit it shows me the length dimension of the column.

Now I am completely clueless how to acces this dimension through the Revit API or for that manner if it’s even possible?


If you can get what you want using dynamo nodes, then you can call dynamo nodes in a python script.
Try to see this post, where I used python for getting parameter values.


Thank you, I also came to the realiziation I could just write


To get the column length dimensions.:grinning: