L5Sharp 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package L5Sharp --version 0.2.0
                    
NuGet\Install-Package L5Sharp -Version 0.2.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="L5Sharp" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="L5Sharp" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="L5Sharp" />
                    
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 L5Sharp --version 0.2.0
                    
#r "nuget: L5Sharp, 0.2.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 L5Sharp@0.2.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=L5Sharp&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=L5Sharp&version=0.2.0
                    
Install as a Cake Tool

L5Sharp

C# library and API for querying and manipulating Rockwell's L5X export files. The goal of this project was to provide a simple and and reusable library for interacting with L5X file to aid in the creation of tools that automate tasks related RSLogix 5000 PLC development.

This project is still under development. If you would like to contribute or have feedback, please reach out. If you like the progress being made, please leave a star. Thanks!

Overview

The main entry point to the L5X is the LogixContent class. Use the factory methods to Load to load a file or Parse to parse a string, exactly how you would with XDocument.

var content = LogixContent.Load("C:\PathToMyFile\FileName.L5X");

Querying Content

Once the LogixContent is created, you can you the component collection methods to get access to most of the primary L5X components, such as Tag, DataType, Module, Program, and more. The following shows some simple querying via the tags component collection interface.

//Get all controller tags. 
var controllerTags = content.Tags();

//Get all in a program by providing a scope name.
var programTags = content.Tags("MainProgram");

//Get a tag by name.
var myTag = content.Tags().Find("MyTag");

//Use LINQ to query further.
var timersInMaingProgram = content.Tags("MainProgram").Where(t => t.DataType == "TIMER");

Modifying Content

Modifying components is simple as well. The same component collection interface offers methods for adding, removing, and replacing component.

//Add a new component.
var tag = new Tag
{
    Name= "NewTag";
    Data = new DINT();
};

content.Tags().Add(tag);

//Remove an existing component.
var result = content.Tags().Remove("MyTag");

//Repalce an existing component.
var result = content.Tags().Replace(tag);

//Save changes when done.
content.Save("C:\PathToMyOutputFile\FileName.L5X");

Query Everywhere

Tags are unique components in that they have different scopes. We have to specify a scope to know where to modify the existing collection. For example, if you call Tags().Add(tag), where do we add the tag?

But what if I just want to query across the entire file, how do I do that? The answer is use the Query<T>() method and specify the type to query as the generic argument.

var allTagsInFile = content.Query<Tag>();

NOTE: Query<T>() just returns an IEnumerable<T>, so it is essentially read only.

Documentation

Logix 5000 Controllers Import/Export

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on L5Sharp:

Package Downloads
L5Sharp.Logix

Adds support to load L5X files from ACD file using Logix SDK.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.3.0 338 5/23/2025
5.2.0 122 5/23/2025
5.1.0 216 5/5/2025
5.0.0 198 5/4/2025
4.8.3 267 4/1/2025
4.8.2 216 3/31/2025
4.8.1 189 3/28/2025
4.8.0 215 2/15/2025
4.7.3 199 12/10/2024
4.7.2 188 11/28/2024
4.7.1 170 11/15/2024
4.7.0 163 11/15/2024
4.6.0 171 11/14/2024
4.5.0 169 11/11/2024
4.4.0 187 10/31/2024
4.3.0 171 10/30/2024
4.2.0 411 10/8/2024
4.1.0 167 10/7/2024
4.0.0 172 10/5/2024
3.3.1 191 9/24/2024
3.3.0 210 7/29/2024
3.2.0 194 7/7/2024
3.1.0 177 7/5/2024
3.0.0 182 6/3/2024
2.3.2 280 5/9/2024
2.3.1 529 5/6/2024
2.3.0 205 5/4/2024
2.2.1 185 4/29/2024
2.2.0 195 4/23/2024
2.1.0 182 4/18/2024
2.0.0 260 4/4/2024
0.19.7 216 3/27/2024
0.19.6 304 3/22/2024
0.19.5 195 3/9/2024
0.19.4 202 2/5/2024
0.19.3 175 2/3/2024
0.19.1 190 1/16/2024
0.19.0 166 1/16/2024
0.18.3 201 1/8/2024
0.18.2 186 1/4/2024
0.18.1 159 12/29/2023
0.18.0 235 12/9/2023
0.17.0 216 12/8/2023
0.16.1 170 11/28/2023
0.16.0 170 11/28/2023
0.15.2 268 8/18/2023
0.15.1 212 8/17/2023
0.15.0 276 8/16/2023
0.14.0 270 8/9/2023
0.13.0 277 8/6/2023
0.12.0 241 8/1/2023
0.11.0 247 7/12/2023
0.10.1 327 3/31/2023
0.10.0 300 3/31/2023
0.9.2 296 3/24/2023
0.9.1 304 3/15/2023
0.9.0 306 3/15/2023
0.8.0 318 3/15/2023
0.7.0 291 3/14/2023
0.6.0 307 3/14/2023
0.5.3 303 3/13/2023
0.5.2 285 3/13/2023
0.5.0 310 3/13/2023
0.4.0 310 3/12/2023
0.3.0 322 3/5/2023
0.2.0 381 3/1/2023

Initial release.