Distinguish Beam from Polybeam Tekla Link

Hi everyone,

Is there any way of differentiate a beam from a polybeam when exporting geometries from Tekla to GH? From a polybeam I can extract the contour points but obviously not from a beam, that is why I want to differentiate between them since the number of options are different within the expand object comand.

Thanks in advance!

Hi @bbalbastre ,
Here is one suggestion: explode the axis of the beam. If the result of that explosion has more than one segment, then it’s a Polybeam:

beam_vs_polybeam.gh (9.8 KB)


Hi @djordje , you came up with a very creative solution! Thank you so much.

I was thinking if there is an attribute capable to extract this information. Maybe @sebastian.lindholm is aware of that.


Hi @bbalbastre ,
Yes, non-grasshopper native components solution, would for example be to check if the object has some property.
PolyBeams do not have starting and ending points but Contour instead. Inputting the ‘Beam’ Tekla parameter to Ghpython component and checking:

if hasattr(beamOrPolyBeam, 'Contour'):

Third, and probably the most programmatic way would be to directly check the type of the beamOrPolyBeam objects:

import clr

TeklaModel_dll = R"C:\Program Files\Tekla Structures\...\Tekla.Structures.Model.dll"
import Tekla.Structures.Model

if isinstance(beamOrPolyBeam, Tekla.Structures.Model.Beam):
elif isinstance(beamOrPolyBeam, Tekla.Structures.Model.PolyBeam):

Hi @djordje

I definitely should try the last option, that’s exactly what I was looking for!

Thank you :slight_smile:

1 Like