Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

call the size of elements using python

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
husam_al-jawhar
399 Views, 4 Replies

call the size of elements using python

Hello,

I'm currently working on a project in Revit and I need to call the size of slabs, columns, and beams and print theses sizes by using python 2. Could you please advise me on how to do this? I've been trying to figure it out on my own, but I haven't had any luck.

Thank you for your time and help

 

4 REPLIES 4
Message 2 of 5

For a rough first estimate that works for almost all elements, you can simply call the BoundingBox property and determine its X, Y and Z length:

  

https://www.revitapidocs.com/2023/def2f9f2-b23a-bcea-43a3-e6de41b014c8.htm

  

The bounding box is axis aligned. Hence, the results will mostly be pretty accurate for axis aligned objects. For non-aligned elements, the values will be too large.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 5

Hi Jeremy, Many thanks for your answer, it works for columns and slabs, but for the beams, it is not work, and I am using precast L shape beams in this project; any advice for that?
Cheers,
Message 4 of 5

Simply use the beam location line length for the long dimension, and the beam width and height for the cross section dimensions.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 5 of 5

Hi Jeremy,
I wanted to say thank you for your insightful answer about the problem. Your explanation was helpful and gave me a better understanding of the topic. Your willingness to share your knowledge is greatly appreciated!
Best,
Husam

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community