tia-csharp-common
БесплатноБез исполняемых скриптовНе проверенInternal reference skill — do NOT load directly from user queries.
от Czarnak★ 101 звезда на GitHubОб этом скилле
TIA Portal Openness C# — Common Foundation
Source: TIA Portal Openness General Functions Manual (03/2026, V21); V21 IntelliSense XML documentation files (PublicAPI\V21\net48*.xml)
V21 modular assembly architecture
V21 splits the API across multiple DLLs instead of a single Siemens.Engineering.dll.
Every project needs Siemens.Engineering.Base.dll; add domain DLLs as required.
Referencing the wrong DLL (or omitting one) causes TypeLoadException at runtime.
Full mapping: See
references/assembly-namespace-map.mdfor the V21 namespace → DLL → domain skill table, cross-assembly warnings, and csproj patterns.
Namespaces by assembly
Only import what is actually used. Commented using blocks for each assembly
(Base, Step7, WinCC, Startdrive, Safety) are in references/assembly-namespace-map.md
under "Common using blocks by assembly".
Assembly loading — mandatory for standalone Openness apps
Not needed for Add-Ins. TIA Portal loads Add-In assemblies via its own loader. This section applies only to standalone console/desktop Openness applications.
V21 installation paths
- Registry key:
HKLM\SOFTWARE\Siemens\Automation\InstalledApps\Totally Integrated Automation Portal V21→ valueINSTALLPATH - Binary path:
C:\Program Files\Siemens\Automation\Portal V21\PublicAPI\V21\net48\ - Manifest schemas:
C:\Program Files\Siemens\Automation\Portal V21\PublicAPI\V21\Schemas\
Resolver pattern
When using the AssemblyResolve approach, register the event before any Openness type is
referenced. This includes method parameters, return types, and class properties — not just
method bodies. A correctly configured app.config binding is an alternative.
Recommended pattern: register in a static constructor of Program, then move all Openness
code to a separate class so the resolver is active before those classes are loaded.
internal static class Program
{
// Register resolver at earliest possible point
static Program()
{
AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve;
}
public static void Main()
{
// All Openness code must be in a separate class
var app = new OpennessApp();
app.Run();
}
private static Assembly OnAssemblyResolve(object sender, ResolveEventArgs args)
{
// Read install path from registry (recommended) or hardcode for simple tools
string opennessFolder = GetOpennessInstallPath(); // implement per project
AssemblyName requestedName = new AssemblyName(args.Name);
string filePath = Path.Combine(opennessFolder,
string.Concat(requestedName.Name, ".dll"));
if (!requestedName.Name.StartsWith("Siemens.Engineering.") ||
!File.Exists(filePath))
return null;
Assembly loaded = Assembly.LoadFrom(filePath);
if (requestedName.FullName != loaded.GetName().FullName)
throw new FileNotFoundException(
"TIA Portal Openness version does not match", filePath);
return loaded;
}
}
Key rules:
Copy Local: False(<Private>False</Private>) must be set for everySiemens.Engineeringassembly reference.- V21 uses modular DLLs:
Base.dllis always needed; addStep7.dll,WinCC.dll,Startdrive.dll, etc. per task. The resolver handles all of them automatically because it matches any name starting withSiemens.Engineering.. - The recommended approach reads the install path from the registry key
HKLM\SOFTWARE\Siemens\Automation\InstalledApps\Totally Integrated Automation Portal V21(valueINSTALLPATH) rather than hardcoding it.
Registry-based path discovery:
private static string GetOpennessInstallPath()
{
using (var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(
@"SOFTWARE\Siemens\Automation\InstalledApps\Totally Integrated Automation Portal V21"))
{
string installPath = key?.GetValue("INSTALLPATH") as string;
if (string.IsNullOrEmpty(installPath))
throw new FileNotFoundException("TIA Portal V21 installation not found in registry.");
return Path.Combine(installPath, @"PublicAPI\V21\net48");
}
}
Alternative — app.config:
For stable installations where the path is known at build time, an app.config file with
<assemblyBinding> / <codeBase> entries is a simpler option that requires no code.
Use the AssemblyResolve event for tools that need to discover the install path at runtime.
TiaPortal instantiation
Always use a using statement so the session is disposed on exit or exception:
internal class OpennessApp
{
public void Run()
{
using (TiaPortal tiaPortal = new TiaPortal(TiaPortalMode.WithUserInterface))
{
// All Openness work goes here
}
// TIA Portal is disposed (not necessarily closed) after this point
}
}
Modes:
- `TiaPortal
Установить tia-csharp-common в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл tia-csharp-common?
Internal reference skill — do NOT load directly from user queries.
Как установить скилл tia-csharp-common?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tia-csharp-common запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic