Get started with the Tekla PowerFab Open API

Updated: 27 Mar 2024

In this guide you will go through how to get started with the Tekla PowerFab Open API. 

Follow this guide to get started with Tekla PowerFab Open API.

What’s possible with the Tekla PowerFab Open API

Watch the short video below to learn how to use the Tekla PowerFab Open API on both the Tekla PowerFab Go web product and the Tekla PowerFab Office desktop product.

You will see how to code an application that uses the drawing management functionality and how the changes get updated to both web and desktop products.

How the Tekla PowerFab Open API works

The Tekla PowerFab Open API provides a data-access layer to the Tekla PowerFab database. The .NET classes model the XSD request and response schemas' structure and content. As a developer it is easiest to code directly with the .NET classes and data types described in the API Reference.

Prerequisites

In order to develop on top of the Tekla PowerFab Open API you need to purchase a Tekla PowerFab license, or join the Tekla Partners Program.

By joining the Tekla Partners Program you will be able to purchase Tekla Partners Program Suite containing the Tekla PowerFab product, along with other Tekla products. 

Not a member of the Tekla Partners Program yet?

Get familiar with the benefits and apply to the Tekla Partners Program. 

Read more

Prepare your setup

  1. To get started you will need to create an empty .NET application project in Microsoft Visual Studio. Follow the steps in this guide: Create a new project in Microsoft Visual Studio.

  2. Next, add reference to the Tekla PowerFab Open API dll package. The package file is called Tekla.PowerFab.API.dll and can be added from NuGet.

    1. From the Project menu in Microsoft Visual Studio select Manage NuGet packages.

    2. Select Browse and search for PowerFab.

    3. Select Tekla.PowerFab.API then click Install.

  3. Then, download and add fabsuite-xml-request-v0108.cs source file to your Microsoft Visual Studio project.

    1. Download the source file here.

    2. On the Project menu of Microsoft Visual Studio, click Add existing item.

    3. Browse to fabsuite-xml-request-v0108.Designer.cs and click Add.

  4. Then, download and add fabsuite-xml-response-v0108.cs source file to your Microsoft Visual Studio project.

    1. Download the source file here.

    2. On the Project menu of Microsoft Visual Studio, click Add existing item.

    3. Browse to fabsuite-xml-response-v0108.cs and click Add.


The Tekla PowerFab API schema is updated often. Updated Request and Response xsd files are installed with Tekla PowerFab in the Docs folder of the program installation directory. To convert these to .cs:

1. Open a Visual Studio Developer Command Prompt

  • From Visual Studio: Tools->Command Line->Developer Command Prompt
  • From Start Menu: Visual Studio -> Developer Command Prompt
2. Navigate to the directory that contains the .xsd file

3. type the following:

xsd /classes [xsd filename]
 
4. The .cs file created can be used in Visual Studio Projects
 

Continue coding by editing an existing code example

Here's a simple Tekla PowerFab API code example.

The code example will show, for example:

  • how to connect and disconnect the Tekla PowerFab database
  • how to read the Production Control jobs
  • how to show each job in a list box
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.