Get column dimensions with Python

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

hoogte_kolommen

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=Options() 
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()

options.ComputeReferences


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.

how to acces this dimension

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

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

i.LookupParameter('Length').AsValueString()

To get the column length dimensions.:grinning:

1 Like