import_xml
Import Control Expert XML into the open project to author LD/FBD/SFC logic, variables, DFBs, DDTs, or configurations, with overwrite, keep-existing, or rename import modes.
Instructions
Import Control Expert XML into the open project — the main way to write LD/FBD/SFC program logic and bulk content.
kind: 'section' (program logic, requires task), 'variables', 'dfb', 'ddt', 'configuration', or 'project' (generic project-level import of an exchange file). Provide the XML either inline via xml_content or as file_path. import_mode: 'overwrite' (default), 'keep_existing' or 'rename'.
Authoring graphical logic (kind='section'): for LD, FBD or SFC, FIRST call get_language_reference(language) and mirror its validated example, then validate_xml the candidate before importing. For Structured Text use write_st_logic instead (no XML needed). Always build_project afterwards and fix the per-section errors it lists.
Tip: export an existing object first (read_section / export_xml) and use its XML as the structural template — Control Expert validates the schema strictly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| task | No | ||
| file_path | No | ||
| import_mode | No | overwrite | |
| xml_content | No |