Skip to content

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

@cmwarre

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.

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