Get Length, Width of Structural Column, to set in a isolated foundation.

Get Length, Width of Structural Column, to set in a isolated foundation.

Anonymous
Not applicable
2,118 Views
2 Replies
Message 1 of 3

Get Length, Width of Structural Column, to set in a isolated foundation.

Anonymous
Not applicable

I writing a code for cauculating the isolated foundation for a especifc column, dependeing fo it dimensions and force Z
i alredy get all informations, and the column like a element class, but i don't now how can i get the Length and Width of this instance sleected. Can someone help me ?

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

architect.bim
Collaborator
Collaborator
Accepted solution

Hi!

To extract length and width you need to get parameter values. Length is a built-in intance parameter. You can get i with get_Parameter method.

length = element.get_Parameter(BuiltInParameter.INSTANCE_LENGTH_PARAM).AsDouble()

Width is probably type parameter. To extact it first you need to get type object. And I think this parameter is not system. So you need to use LookupParameter method and specify its name. In my case it is 'b'.

width = doc.GetElement(element.GetTypeId()).LookupParameter('b').AsDouble()

P.S. Exapmles are written in Python. I hope you'll be able to adapt it for C# if you use it.


Maxim Stepannikov | Architect, BIM Manager, Instructor
0 Likes
Message 3 of 3

binsaugust
Community Visitor
Community Visitor

Could you please share the full code showing how to import above data?Sorry am new to pyRevit /rpw and trying to learn how to impot dimension to a flexform.

0 Likes