Tekla automation: custom components, macros, plug-ins and AI

Every Tekla office automates something. The question is never whether, it’s which tool, and most teams pick the one they already know, long after it has stopped being the right one.

Here are the six ways I know, roughly in the order people climb them. For each one, the point where it runs out. That point is the useful part: it tells you when to move up a step, and when not to.

Custom components: no code, until the rule outgrows the variables

My first Tekla automation wasn’t code. It was custom components that wrapped our typical business logic around the reinforcement of embeds. Pick the embed, and the bars, their spacing and their cover follow the rules everyone at work already agreed on. No Visual Studio, no licence, and every detailer can open it in the Custom Component Editor and see what it does.

Start here. Really. If a custom component does the job, it’s the cheapest tool on this page to keep alive.

It runs out when the logic doesn’t fit in the variables table. Formulas and a few conditions are fine. A lookup in the production database, a value from a file, or a decision that depends on the other forty elements in the pour isn’t. The editor has nowhere to put it.

Recorded macros remember clicks. They can’t ask for one.

Press record, run through a dialog, stop. Tekla writes a .cs file that replays it. For “apply these settings, run this command, save” it works.

Then you try to record something real, and it can’t stop to let you pick. A recorded macro doesn’t catch the user’s clicks, and in Tekla most modelling commands start with one: pick the wall panel, pick the point, pick the face. A macro that can’t wait for a pick can only do the parts of the job that never needed you.

The useful thing about a recorded macro is the file it leaves behind. It’s C#. Open it, and you’re one step from the next rung.

Grasshopper: visual programming, model and drawings

Trimble’s Grasshopper-Tekla Live Link lets a Grasshopper definition create and drive Tekla parts. You wire components instead of writing code, and the geometry updates when you drag a slider. For a stadium roof or a façade with 300 panels that all differ a little, nothing else on this page is as fast to try ideas with.

The Live Link stops at the model. Drawings were the gap, which is why I wrote Grasshopper Tekla Drawing Link: free, open source, and it drives views, dimensions, marks and PDF and IFC export from the same canvas.

Where it runs out: a Grasshopper definition is great for the person who built it and hard for anyone else to run. A detailer who only wants a button won’t open Rhino for it.

A written macro: the first code that can wait for you

Same .cs file as a recorded macro, but you write it against the Tekla Open API. Now it can do what the recorder couldn’t:

var picker = new Picker();
try
{
    var panel = picker.PickObject(Picker.PickObjectEnum.PICK_ONE_PART, "Pick the wall panel") as Part;
    Point spot = picker.PickPoint("Pick where the embed goes");   // waits for the user's click
    // ...place the embed and its reinforcement on panel, at spot
}
catch (Exception)   // Esc throws. There's no null for "cancelled".
{
    return;
}

One file, dropped in the macros folder, shared by email. It runs out when the tool needs its own window, settings it remembers, or other software like Excel or your ERP. That’s an app.

Apps and plug-ins: does the result have to follow the model?

A standalone app is an exe with its own window, connected to the Tekla on the same PC. A take-off that writes volumes and weights to Excel, a release check, a batch edit over every drawing in a phase.

A plug-in lives in the model. Change the wall panel and Tekla runs it again, so the embeds move with it. That’s the custom component idea again, with C# behind it instead of a variables table. It’s also the hardest of the three to build, debug and ship, so only build one when the result really must follow the model. Post 09 has the full table of macro, app and plug-in.

An AI agent doesn’t add a step. It makes the top ones shorter.

For years the top half of this page meant learning C# first, and most detailers stopped at recorded macros. That’s what changed. An AI coding agent writes the C#, compiles it, reads the errors and tries again. Drawing Link took me 162 active days. TeClash, written with an agent, took five. The numbers and their catch are in another post.

It isn’t magic. Out of the box, the agent invents Tekla methods that don’t exist and guesses units, because there’s so little public Tekla code to learn from. That’s why I keep a Tekla Open API skill: the real API, the traps and the patterns, loaded into the agent before it writes a line. It still gets things wrong. You still read what it wrote and try it on a copy of the model.

And it doesn’t make the bottom of the ladder obsolete. If the custom component for your embed works, keep it. The agent is for the jobs that were always worth a plug-in and never worth six months of learning C#.

Which step to stand on

  • Parametric detail with clear rules: custom component.
  • Same dialog steps every time, no picking: recorded macro.
  • Geometry or drawings you want to explore visually: Grasshopper, with Live Link and Drawing Link.
  • A command that needs picks or logic: written macro. Its own window or Excel: app.
  • The result must follow the model: plug-in, ideally written with an agent.

The course starts where the recorder stops. Lesson one is a read-only macro, written by your AI agent with the skill loaded and read line by line by you. From there it climbs the same ladder as this page: tools that change the model, a WPF app, and a plug-in packaged as a .tsep. You don’t need years of C# before you start. You need to know Tekla.

Tekla Open API Course: build real Tekla tools with an AI agent →

Related: What is Tekla Open API? A guide for detailers and engineers · AI agent for Tekla Open API: why a chatbot isn’t enough · Tekla Open API skill: why AI invents API that doesn’t exist

Tags

Greg Olszewski

Greg Olszewski builds Tekla Open API tools: Grasshopper Tekla Drawing Link, Smart Select, Tekla Lookup. Ten years of C# on Tekla Structures, day job in precast. Now he teaches engineers to build their own.

About Greg ›

COURSE

Build your own Tekla tools

Learn the Tekla Open API in C#, from your first plug-in to tools your team actually uses.

See the course ›