Table of Contents

Class L5X

Namespace
L5Sharp
Assembly
L5Sharp.dll

A XElement decorator that adds members for interacting with the root L5X content. This class should represent the root RSLogix5000Content element of the L5X file.

public class L5X : XElement, IXmlLineInfo, IXmlSerializable
Inheritance
L5X
Implements
Inherited Members
Extension Methods

Remarks

Most of these methods and properties are meant to be internal and are used by LogixContent. However, the user can use this type if they need direct access to the underlying XML to perform custom query or extend the API.

Constructors

L5X(XElement)

Creates a new L5X instance wrapping the provided XElement object.

public L5X(XElement content)

Parameters

content XElement

Fields

DateTimeFormat

The date/time format for the L5X content.

public const string DateTimeFormat = "ddd MMM d HH:mm:ss yyyy"

Field Value

string

Properties

ContainsContext

Gets the value indicating whether the current L5X is contextual..

public bool? ContainsContext { get; set; }

Property Value

bool?

ExportDate

Gets the date time that the L5X file was exported.

public DateTime? ExportDate { get; }

Property Value

DateTime?

Owner

Gets the owner that exported the current L5X file.

public string? Owner { get; set; }

Property Value

string

SchemaRevision

Gets the value of the schema revision for the current L5X content.

public Revision? SchemaRevision { get; set; }

Property Value

Revision

A Revision type that represent the major/minor revision of the L5X schema.

Remarks

This is always 1.0. If the R

SoftwareRevision

Gets the value of the software revision for the current L5X content.

public Revision? SoftwareRevision { get; set; }

Property Value

Revision

A Revision type that represent the major/minor revision of the software.

TargetName

Gets the name of the Logix component that is the target of the current L5X context.

public string? TargetName { get; set; }

Property Value

string

TargetType

Gets the type of Logix component that is the target of the current L5X context.

public string? TargetType { get; set; }

Property Value

string

Methods

GetContainer(string)

Gets a top level container element from the root controller element of the L5X.

public XElement GetContainer(string name)

Parameters

name string

The name of the container to retrieve.

Returns

XElement

A XElement representing the container with the provided name.

Exceptions

InvalidOperationException

The element does not exist.

GetController()

Gets the root controller element of the L5X file.

public XElement GetController()

Returns

XElement