Skip to content

L5X export: Program elements are missing their Name attribute #20

Closed

Description

@cmwarre

Description

When exporting to L5X, all <Program> elements are written with no Name attribute. Routines nested within them export their names correctly, but the parent program element does not.

Steps to Reproduce

from acd.api import ExportL5x
import xml.etree.ElementTree as ET

exporter = ExportL5x("project.ACD", "build/")
root = ET.fromstring(exporter.project.to_xml())
for prog in root.find("Controller").find("Programs"):
    print(prog.get("Name"))  # prints None for every program

Expected Behavior

Each <Program> element should carry a Name attribute matching the program name in the ACD project:

<Program Name="MainProgram" ...>
  <Routines>
    <Routine Name="Main" Type="RLL">

Observed Behavior

<Program>
  <Routines>
    <Routine Name="Main" Type="RLL">

The program name is available in the Python object model (it is used to populate routine names correctly), so this appears to be an omission in the XML serialization step.

Activity

  1. added a commit that references this issue on Mar 27, 2026
  2. jpect commented on Mar 27, 2026

    @jpect
    Contributor

    Fixed in commit fb79240 on the jpect/acd fork. A follow-up PR will be submitted once the initial PR #18 is reviewed.

  3. added a commit that references this issue on Mar 27, 2026
  4. cmwarre commented on Apr 17, 2026

    @cmwarre
    CollaboratorAuthor

    Fixed by PR #28 (merged from cmwarre/fix/l5x-export-issues). All exported Program elements now include the Name attribute. Verified against ACDTestsWithAOI.ACD, ACDTestsNonRedundant.ACD, and ProjectTemplate.ACD — closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions