Tekla.Extension 2026.0.0

dotnet add package Tekla.Extension --version 2026.0.0
                    
NuGet\Install-Package Tekla.Extension -Version 2026.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tekla.Extension" Version="2026.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tekla.Extension" Version="2026.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Tekla.Extension" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tekla.Extension --version 2026.0.0
                    
#r "nuget: Tekla.Extension, 2026.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tekla.Extension@2026.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tekla.Extension&version=2026.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Tekla.Extension&version=2026.0.0
                    
Install as a Cake Tool

<div align="center"> <img src="Tekla.Extension/icon.png" alt="Tekla.Extension" width="120" />

Tekla.Extensions

NuGet Downloads License

</div>

The best unofficial library for Tekla Structures Open API

You can easily change you coding in Tekla Structures with this library

Benefits

  1. Easy to use
  2. Saving time for code
  3. More classes for showing your data
  4. Makes your code clean and readable

Code Examples

This code examples show you why you need to use this library.

How did you code before

using TSMUI = Tekla.Structures.Model.UI;
using Tekla.Structures.Model;
    public double GetWeight()
    {
            //Summing all weight of all parts in Assembly
            TSMUI.ModelObjectSelector selector = new();
            double allWeight = 0;
            ModelObjectEnumerator enumerator = selector.GetSelectedObjects();
            while (enumerator.MoveNext())
            {
                if (enumerator.Current is Assembly assembly)
                {
                    ModelObject mainPart = assembly.GetMainPart();
                    _ = mainPart.GetReportProperty("WEIGHT", ref allWeight);
                    foreach (object item in assembly.GetSecondaries())
                    {
                        ModelObject modelObject = item as ModelObject;
                        double tempWeight = 0;
                        modelObject.GetReportProperty("WEIGHT", ref tempWeight);
                        allWeight += tempWeight;
                    }
                }
            }
            return allWeight;
    }

How you write with LINQ queries

using TSMUI = Tekla.Structures.Model.UI;
using Tekla.Structures.Model;
using Tekla.Extension;
        public double GetWeight()
        {
            //Summing all weight of all parts in Assembly
            TSMUI.ModelObjectSelector selector = new();

            return selector.GetSelectedObjects()
                    .ToIEnumerable<Assembly>()
                    .FirstOrDefault()
                    .GetAllPartsOfAssembly()
                    .Select(a => a.GetWeight())
                    .Sum();
        }

How did you code before

public class AssemblyPrefixNumberer
{
    public static void NumberSelected()
    {
        Tekla.Structures.Model.UI.ModelObjectSelector selector = new Tekla.Structures.Model.UI.ModelObjectSelector();
        var objects = selector.GetSelectedObjects();

        List<Assembly> assemblies = new List<Assembly>();
        Assembly tempAssembly;
        var enumerator = objects.GetEnumerator();
        while (enumerator.MoveNext())
        {
            try
            {
                tempAssembly = enumerator.Current as Assembly;
                if (tempAssembly != null) assemblies.Add(tempAssembly);
            }
            catch { }
        }

        int index = 1;
        Part tempPart;
        foreach (Assembly assembly in assemblies)
        {
            var parts = assembly.GetSecondaries();
            parts.Add(assembly.GetMainPart());
            foreach (object partObj in parts)
            {
                tempPart = partObj as Part;
                if (tempPart != null)
                {
                    // Изначально хотел заполнить поле префикс сборки для детали, но это не работает.
                    tempPart.AssemblyNumber.Prefix = $"{index}";
                    tempPart.Modify();
                }
            }
            index++;
        }
        var result = new Model().CommitChanges();
    }
}

The same code after using Tekla.Extension

public class AssemblyPrefixNumberer
{
    public static void NumberSelected()
    {
        int index = 1;
        new Tekla.Structures.Model.UI.ModelObjectSelector().GetSelectedObjects()
            .ToIEnumerable<Assembly>()
            .SelectMany(a => a.GetAllPartsOfAssembly())
            .ToList()
            .ForEach(p =>
            {
                p.PartNumber.Prefix = index.ToString("0");
                p.Modify();
                index++;
            });

         new Model().CommitChanges();
     }
}

Non case sensetive report property

using TSMUI = Tekla.Structures.Model.UI;
using Tekla.Structures.Model;
using Tekla.Extensions;


        var part = new TSMUI.ModelObjectSelector()
            .GetSelectedObjects()
            .ToIEnumerable<Part>()
            .FirstOrDefault();

        double netWeight = part.GetReportProperty<double>(" weight net ");

Third Party Licences

The Tekla.Extensions library makes use of the 3rd party software package, under his associated licences

Support & Help

Create the ussie if you have any question or problems using the library. Our contributors will try to help you

Tekla API Requirements

This project uses the Tekla Structures API, which is proprietary software owned by Trimble.

Requirements:

  • A valid Tekla Structures license is required to use this software
  • The Tekla API libraries (DLLs) are NOT included in this repository
  • Users must have their own licensed copy of Tekla Structures installed

Commercial Use:

  • This code is provided for educational and personal use
  • Commercial distribution of applications built with Tekla API requires membership in the Tekla Partners Program
  • See Tekla Developer Policy for details

Disclaimer

This is an independent open-source project and is not affiliated with, endorsed by, or supported by Trimble, Tekla, or any of their affiliated companies.

The Tekla® name and logo are registered trademarks of Trimble Inc. or its affiliates.

License

This project code is licensed under the MIT License - see the LICENSE file for details.

Note: This license applies ONLY to the code in this repository, NOT to the Tekla API itself, which is subject to Trimble's licensing terms.

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.0.0 194 9/16/2026
2025.0.3 201 5/17/2026
2025.0.2 188 3/31/2026
2025.0.1 182 2/27/2026
2024.0.3 147 5/17/2026
2024.0.2 156 3/31/2026
2024.0.1 162 2/27/2026
2023.0.3 141 5/17/2026
2023.0.2 155 3/31/2026
2023.0.1 173 2/27/2026
2022.0.3 152 5/17/2026
2022.0.2 154 3/31/2026
2022.0.1 168 2/27/2026
2021.0.3 139 5/17/2026
2021.0.2 166 3/31/2026
2021.0.1 180 2/27/2026
2020.0.3 146 5/17/2026
2020.0.2 154 3/31/2026
2020.0.1 173 2/27/2026
Loading failed

More methods and features