Introduction to the Tekla Tedds API

Updated: 13 Nov 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 Tedds API provides access to the services of two separate applications, the Tedds Calculator and the Tedds Application. The Tedds Calculator is the application which performs the actual calculation processing, it can be used to evaluate single mathematical expressions or to evaluate complete calculations and is the service which the Tedds Application and Tedds for Word use. The Tedds application is the same application you would normally use manually and allows you to create documents and projects which can then be managed, stored, printed, converted to PDF, etc. Depending on your requirements the two applications can be used independently or they can be used together to provide a complete solution for automating calculations and producing documentation.

Using the Tedds Calculator

 

The Tedds Calculator is the application which performs the actual calculation processing, it can be used to evaluate single mathematical expressions or to evaluate complete calculations.

The Tekla Tedds Calculator 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 are using Microsoft Visual Studio the preferred method for consuming the Tedds API is to use the public Nuget package. From your development project in Visual Studio open the NuGet Package Manager then add a reference to Tekla Tedds API Nuget Package which will allow you to use both the Tedds Calculator and the Tedds Application.
  • For other development languages or environments manually add a reference to Tedds.TeddsCalcIA.dll which is located in the Tedds installation directory
  • 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. 

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 the Tedds Application

The Tedds Application API allows you to automate tasks using the features of the Tedds application. For example you can create a project, add new documents, calculate those documents and convert final output documentation to PDF format. You cannot directly provide input variables to a calculation using just the Tedds application. However by using the Tedds Calculator you can generate input variables and pre-calculated output which can then be used with the Tedds application to create Tedds documents.

 

The Tedds Application is an Out-of-process COM Server Tedds.exe which means it can be used from both 32-bit and 64-bit processes.

 

  • If you are using Microsoft Visual Studio the preferred method for consuming the Tedds API is to use the public Nuget package. From your development project in Visual Studio open the NuGet Package Manager then add a reference to Tekla Tedds API Nuget Package which will allow you to use both the Tedds Calculator and the Tedds Application.
  • For other development languages or environments manually add a reference to Tedds.TeddsCalcIA.dll which is located in the Tedds installation directoryIf 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 Application object directly or use the ProgId Tedds.Application. Once the application has been started if you need the end user to see the user interface then make sure you set the applications Visible property. You can then use the object model for Projects and/or Documents to create or open files as appropriate for your requirements.

 

Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.