
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.











