# Get column dimensions with Python

**URL:** <https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555>\
**Category:** Revit\
**Tags:** python\
**Created:** [December 20, 2017, 10:41am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555 "2017-12-20T10:41:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/claus/32/37199_2.png) [@Claus](https://forum.dynamobim.com/u/Claus)\
**Post date:** [December 20, 2017, 10:41am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/1 "2017-12-20T10:41:03Z")

</div>

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

![hoogte_kolommen](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/5/3/536f3f84db507c0838b220452e308458ab4d274d.PNG)

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](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/a/7/a7f13140b173c28f1f2c90aa301494d11e95954e.png)

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

---

<div class="post-metadata">

**Author:** ![Claus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/claus/32/37199_2.png) [@Claus](https://forum.dynamobim.com/u/Claus)\
**Post date:** [December 20, 2017, 11:13am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/3 "2017-12-20T11:13:26Z")

</div>

> [@erfajo](#):
>
> import clr clr.AddReference(‘RevitAPI’) clr.AddReference(‘RevitNodes’) from Autodesk.Revit.DB import DisplayUnitType, UnitUtils from Revit import Elements parts = IN[0] # values lengths = diameters = widths = depths = # output unit unit = DisplayUnitType.DUT\_MILLIMETERS for part in parts: # length lengths.append(part.GetParameterValueByName(‘Length’)) # diameter diameter = part.GetParameterValue…

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

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

To get the column length dimensions.😀

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [May 14, 2025, 1:13am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/4 "2025-05-14T01:13:42Z")

</div>

> [@erfajo](#):
>
> import clr clr.AddReference(‘RevitAPI’) clr.AddReference(‘RevitNodes’) from Autodesk.Revit.DB import DisplayUnitType, UnitUtils from Revit import Elements parts = IN[0] # values lengths = diameters = widths = depths = # output unit unit = DisplayUnitType.DUT\_MILLIMETERS for part in parts: # length lengths.append(part.GetParameterValueByName(‘Length’)) # diameter diameter = part.GetParameterValue…

Hi. I need to get the column Height. I don’t know how to re-write this phyton code? can somebody help me on this?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 14, 2025, 6:33am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/5 "2025-05-14T06:33:34Z")

</div>

Use the out of the box node `Element.GetParameterValueByName`

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [May 14, 2025, 8:28am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/6 "2025-05-14T08:28:23Z")

</div>

Hi @jacob.small, System family columns doesn’t have the Height parameter.  
My column extends from Level to Level. Sometimes, there is a Top Offset and Bottom Offset in some of the columns.

Type Properties only shows this :

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/f/afa6da9c8fd5ba2ba1516efd0afccedef1b7bcb8.png)  
so I was wondering how can I get the Height.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 14, 2025, 9:33am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/7 "2025-05-14T09:33:24Z")

</div>

What do you see in the properties pallet when you select the instance (not the type)?

What about when you select an instance and use Element.Parameters?

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [May 14, 2025, 9:44am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/8 "2025-05-14T09:44:59Z")

</div>

I only see this :

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/0/8015e8f946774410f68d4b9a88f834a3aa15d79b.png)

and in the element.parameters

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/6/f623f54582cfe66521aab128bd0897f01d717792.jpeg)

sorry i don’t know how to resize the watch node.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 14, 2025, 9:51am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/9 "2025-05-14T09:51:18Z")

</div>

Oh you’re in an older build… think it’s the one with a bug that prevents resizing.

Can you post a .rvt?

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [May 14, 2025, 9:56am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/10 "2025-05-14T09:56:13Z")

</div>

[TEST\_ColumnHeight.rvt](https://forum.dynamobim.com/uploads/short-url/xKbZyytHbHrXjixn5Tt7cFYm4L5.rvt) (4.7 MB)  
here is a Revit sample model with Column Varying Height but extends from Level to Level but with varying Top and Bottom Offsets

I am using Revit 2021 and this is my Dynamo version:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d0d74f7bec474d92f9c8c1721d84d1b8debd4f61.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 14, 2025, 9:57am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/11 "2025-05-14T09:57:11Z")

</div>

Which Revit version are you in?

EDIT: nevermind see it now.

I don’t have 2021, but will try 2022 (installed Friday to test a tool which is being updated).

You’re 2 years outside the support window and as such it’s a security risk. It’s like you are running windows XP… And before you ask, yes, the project can be updated. You might not be able to push that envelope but you can make the person who is holding up the update aware of the issues they’re causing and the risks they’re causing for the entire project team.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 14, 2025, 10:13am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/12 "2025-05-14T10:13:43Z")

</div>

Two options to get you started:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/9/497065e2da7c0d48b4b45eebbb5afa8db1f8bc5f.png)

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [May 16, 2025, 7:45am UTC](https://forum.dynamobim.com/t/get-column-dimensions-with-python/17555/13 "2025-05-16T07:45:14Z")

</div>

Thanks so much @jacob.small.
