Plugboard.Tracking.Tekla 0.1.0

dotnet add package Plugboard.Tracking.Tekla --version 0.1.0
                    
NuGet\Install-Package Plugboard.Tracking.Tekla -Version 0.1.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="Plugboard.Tracking.Tekla" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugboard.Tracking.Tekla" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Plugboard.Tracking.Tekla" />
                    
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 Plugboard.Tracking.Tekla --version 0.1.0
                    
#r "nuget: Plugboard.Tracking.Tekla, 0.1.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 Plugboard.Tracking.Tekla@0.1.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=Plugboard.Tracking.Tekla&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Plugboard.Tracking.Tekla&version=0.1.0
                    
Install as a Cake Tool

Plugboard.Tracking.Tekla

Usage tracking for Tekla Structures plugins and their dialogs, on top of Plugboard.Tracking.Core. Set up Plugboard.Tracking.Core first (config file, C# 9); this package adds run and dialog tracking through one static class, TeklaTracking.

Model and drawing plugins

Keep PluginBase (or DrawingPluginBase) and put Run's body into TeklaTracking.Run:

using Plugboard.Tracking.Tekla;

[Plugin("Rebar Exporter")]
[PluginUserInterface("RebarExporter.MainForm")]
public class RebarExporter : PluginBase
{
    private readonly StructuresData _data;

    public RebarExporter(StructuresData data)
    {
        _data = data;
    }

    public override List<InputDefinition> DefineInput() { ... }

    public override bool Run(List<InputDefinition> Input) => TeklaTracking.Run(this, Input, () =>
    {
        ...   // the plugin's work, as before
        return true;
    });
}

The plugin and its dialog must inherit Tekla's own base classes directly. Tekla reads the plugin DLL without loading it, and only recognises:

  • a plugin whose base class is PluginBase or DrawingPluginBase;
  • a dialog whose base class is PluginFormBase or PluginWindowBase.

It can't follow a base class kept in another DLL, so a plugin or dialog with one isn't loaded, and Tekla shows no error.

Each run sends:

Event Default Data
plugin_run_started off inputCount, pluginData
plugin_run_completed on durationMs, success, inputCount, exceptionType and exceptionMessage when the run threw, pluginData

success is false when the work returns false or throws. Exceptions are re-thrown unchanged after they were tracked, so Tekla behaves as before. Tracking never makes a run fail.

{
  "durationMs": 1250,
  "success": true,
  "inputCount": 1,
  "pluginData": { "Profile": "HEA300", "Material": "S355", "Offset": 50 }
}

Plugin data

With "pluginData": { "enabled": true } in plugboard-tracking.json, run events include what the user entered in the plugin dialog. That's the fields of the plugin's data class marked with [StructuresField], by field name. It's off by default.

  • Finding the data: the data object is found automatically. It's the first field (or auto-property) of the plugin holding an object with [StructuresField] fields.
    • When the data lives elsewhere, pass it: TeklaTracking.Run(this, Input, () => ..., pluginData: _settings).
    • An object without [StructuresField] fields is sent with its public properties and fields.
  • Choosing fields: includeFields / excludeFields choose fields by name, e.g. "excludeFields": ["Password", "Comment"].
  • Empty values: Tekla's "no value" for int and double fields is sent as null.
  • Size limit: fields that don't fit in maxSizeBytes (default 16 KB) are left out, and pluginDataTruncated: true is added.
  • Errors: if reading the data fails, the run is tracked without it and the error is logged.

Plugin dialogs

Call TeklaTracking.TrackDialog(this) in the dialog's constructor. It works the same for a WinForms PluginFormBase and a WPF PluginWindowBase. It sends:

  • form_opened;
  • form_closed (off by default);
  • button_clicked for the dialog's buttons, including Tekla's OK / Apply / Modify / Get / On/Off / Cancel buttons.
public partial class MainForm : PluginFormBase   // or MainWindow : PluginWindowBase
{
    public MainForm()
    {
        InitializeComponent();
        TeklaTracking.TrackDialog(this);
    }
}

WPF dialogs are usually tracked even without the call, as long as the plugin references WPF and its assembly is set up. The call makes sure of it.

Only clicks are recorded, never what is typed into the dialog. See Forms, windows and buttons.

Custom events

From anywhere in the plugin:

PlugboardTracker.Track("export_done", new { files = 12, format = "IFC" });

Tekla versions

One package works with Tekla Structures 2021 and every later version:

  • API version: it's compiled against the Tekla 2021 Open API and only uses members that exist in every later version. CI also compiles it against the newest Tekla API.
  • Dependencies: its Tekla dependencies are compile-only, with an open range (>= 2021.0.0), and no Tekla assemblies are copied to the plugin's output. The plugin's own Tekla package references, e.g. Tekla.Structures.Plugins 2025, take precedence.
  • At run time: Tekla redirects older Open API versions to its own (oldVersion="0.0.0.0-<current>" in TeklaStructures.exe.config). So the same Plugboard.Tracking.Tekla.dll loads in every Tekla version the plugin runs in.
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
0.1.0 55 11/24/2026