open_project
Open a MotionWorks IEC project, detect its source format, merge all exports, and return a summary with divergences. For native projects without exports, it provides export guidance.
Instructions
Open a MotionWorks IEC project, merging every export form present.
This is the entry point for every other tool. path may be a PLCopen XML
file, an Extended IEC 61131-2 export directory, or a native project
directory — the source is detected, not declared.
Returns the project summary plus a divergences list. Read that list: the
exports are incomplete in different ways (an XML export can omit POUs that
the Extended export has, or ship them with an empty body), so a divergence is
often the most important thing about a project.
If you passed a native project (.mwt) with no export beside it, the
response also carries an exportGuidance block. Its code lives in a compound
binary, so no source, variables, types or I/O can be read. The block says exactly
what is missing, what that costs you, the verbatim steps to produce each export,
and — if exports exist elsewhere on disk — the path to the one matching this
project. Relay those steps to the user rather than guessing at the code.
Args: path: File or directory to open.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |