Introduction to the Tekla Tedds Add-In API
Tekla Tedds Add-In Architecture
Tekla Tedds includes an Add-In architecture that allows anyone with Microsoft .Net programming experience to extend the Tedds function library with their own custom functions. Creating an Add-In allows you to integrate Tedds with your existing in-house software applications or applications and services from other 3rd parties.
To create a Tekla Tedds Add-In you must develop a Microsoft .Net assembly which exposes classes and methods which conform to the following rules:
- The class(es) containing the methods must be public so that they are visible from outside of the assembly
- Each class method must be public static (C#) or public shared (VB) so that it is visible from outside of the assembly
- Parameters and return values must be one of the following primitive types: void(return value only), bool, int, double or string
- Function names must have a maximum length of 32 characters
Once an Add-In is registered with Tedds, each of the public static/shared methods in the Assembly will be available to your Tedds calculations.
To use a Tedds Add-In the Microsoft .Net assembly you have written must be registered with Tedds. To register an assembly follow the steps below:
- If either Tekla Tedds or Tekla Tedds for Word are open close them.
- Locate the Tedds add-In registration directory which is normally at "C:\ProgramData\Tekla\Structural\Tedds\AddIns".
- In the Tedds add-In registration directory create a text file that is named with the fully qualified namespace of your add in and uses the file extension ".addin". For Example, if your assembly namespace was MyCompany and the add-In class you want to register is named MyAddIn then you would name the text file "MyCompany.MyAddIn.addin".
- Open the text file you created in step 3 and on the first line of the text file type the full path to the assembly that contains your add-in and save the file. For example, C:\TeddsAddIns\MyCompany.MyAddIn.dll.
To test if your add-in has been registered successfully follow the steps below:
- Launch Tekla Tedds for Word
- In a new Tedds for Word document type the expression ListFunctions() = ?
- Calculate the document
- Calculating the ListFunctions method will list in your document all of the registered Tedds functions in a list which is sorted alphabetically. If your add-in has been registered and loaded correctly the functions you have published in your Add-In should be included in this list.