Tekla.Extension 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tekla.Extension --version 1.0.0
NuGet\Install-Package Tekla.Extension -Version 1.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="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tekla.Extension --version 1.0.0
#r "nuget: Tekla.Extension, 1.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.
// Install Tekla.Extension as a Cake Addin
#addin nuget:?package=Tekla.Extension&version=1.0.0

// Install Tekla.Extension as a Cake Tool
#tool nuget:?package=Tekla.Extension&version=1.0.0

Tekla.Extensions

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.Extensions;
        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();
        }

Licence

The Tekla.Extensions library is made available under The 2-Clause BSD License.

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

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
1.5.1 116 3/31/2024
1.5.0 95 3/31/2024
1.4.0 106 3/3/2024
1.3.0 206 8/5/2023
1.2.0 148 7/21/2023
1.1.0 144 7/12/2023
1.0.0 136 7/12/2023

Initial package.