How to get column height

How to get column height

alexandra.anton34WM4
Participant Participant
1,848 Views
2 Replies
Message 1 of 3

How to get column height

alexandra.anton34WM4
Participant
Participant

Hello,

 

There is any possibility to get the column height using API?

 

I also need to extract column Constraints.BaseOffset and Constraints.TopOffset

It is possible to do this through API?

 

 

Thank you.

0 Likes
Accepted solutions (1)
1,849 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

Yes, very easily indeed.

 

Please work through the Revit API getting started material to understand the basics and enable you to create your first Revit add-in:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#2

  

That also explains how to access and read parameter values of elements.

 

The data you seek is stored in parameters, like most Revit BIM information.

 

You can use RevitLookup to explore exactly where:

 

https://github.com/jeremytammik/RevitLookup

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

studio-a-int
Advocate
Advocate
Accepted solution

You just need to collect all Structural Columns in your project using a FilteredElementCollector:

structuralColumns = FilteredElementCollector(doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_StructuralColumns).ToElements()

If you want to filter based on specific properties, add a filter.

Then go through your collection and pull the parameters you are looking for such as:

columnLength = i.get_Parameter(BuiltInParameter.INSTANCE_LENGTH_PARAM).AsDouble()
baseOffset = i.get_Parameter(BuiltInParameter.SCHEDULE_BASE_LEVEL_OFFSET_PARAM).AsDouble() # or .AsValueString() if you just want to "print" the data.

all the parameters you are looking for a Built In Parameters.