Tekla.Extension
1.0.0
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
<PackageReference Include="Tekla.Extension" Version="1.0.0" />
paket add Tekla.Extension --version 1.0.0
#r "nuget: Tekla.Extension, 1.0.0"
// 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
- Easy to use
- Saving time for code
- More classes for showing your data
- 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
- 'Tekla Structures open API' : https://www.tekla.com/terms-and-conditions/eula
Support & Help
Create the ussie if you have any question or problems using the library. Our contributors will try to help you
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- TeklaOpenAPI (>= 2020.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial package.