How to extract Properties from Tekla Profiles (Tekla Open API)

Tekla - "open" api
Beam Profile Properties. We want to extract them with the Tekla API.
How to get beam properties.

You have a profile e.g. “CC200755.0″ obtained via the Tekla API. How can you extract it’s HEIGHT or WIDTH or other parameters (or properties) such as density? The Tekla Documentation is not good on this point, and it took me some time to find this out. I have documented the methodology, so hopefully that will save you some time.

In our use case, users select a profile via text (or rather via a CLI). How we need to build a shed from it. In order to build that shed, we need to know the specific properties of the profile that is selected. How do you do that via the Tekla Open API?

        public double getHeight(string profileString)
        {
            LibraryProfileItem libraryProfileItem = new LibraryProfileItem();
            libraryProfileItem.Select(profileString);

            List<ProfileItemParameter> parameters = libraryProfileItem.aProfileItemParameters.Cast<ProfileItemParameter>().ToList();
            double height = parameters.First(p => p.Property.ToUpper() == "HEIGHT").Value;

            return height;
        }

If you need some further explanation on what this all means, check out the video explanation below:

For more information our Tekla’s API’s feel free to check out our Tekla API blog.

Tekla - "open" api
The API is really closed, though it says it is open

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *