Introduction to Tekla Tedds API

Updated: 14 May 2020

Windows programming

Tekla Tedds includes an Application Programming Interface (API) which allows anyone with Windows programming experience to integrate Tekla Tedds with existing in-house software applications or applications and services from other 3rd parties.

The API can be used from any Windows programming language which supports the Microsoft Component Object Model (COM) architecture, for example Visual Basic for Applications (VBA) which is available in Excel, Visual Basic .NET, C#, C++, VB Script and many more.

Functionality of Tekla Tedds available through the API

The Tekla Tedds API is deliberately very lightweight and the Calculator object only supports a few methods. However all of the functionality of Tekla Tedds is available to you by using the Calculator.Functions.Eval method. This method can calculate any expression that Tekla Tedds is capable of calculating, i.e. anything you could normally write in Tekla Tedds for Word.

Please refer to the normal Tekla Tedds functions documentation for full details on the functions that are available. 

Using TeddsCalc

The Tekla Tedds API uses an out-of-process COM Server TeddsCalc.exe which means it can be used from both 32-bit and 64-bit processes.

  • If you're using a Microsoft .NET based development language add a reference to Tedds.TeddsCalcIA.dll.
  • If you are using a language that only supports COM then reference TeddsCalc.tlb

Create an instance of the Calculator object or use the ProgId Tedds.Calculator.  

To start using the Tekla Tedds calculator you must first initialize the Tekla Tedds system using Calculator.Initialize, the arguments you need to pass will depend on your requirements, refer to the Calculator.Initialize documentation for more details. 

Once the calculator is initialized you can start assigning variables by using Calculator.Functions.SetVar and evaluating expressions using Calculator.Functions.Eval. Results can be returned using Calculator.Functions.GetVar which will return a CalcValue object.