proj_set_code
Writes PLC declaration and implementation into TwinCAT .TcPOU/.TcDUT/.TcGVL files, preserving other XML, creating a .bak, and removing stale LineIds for closed-XAE or batch edits.
Instructions
Write declaration/implementation back into the .TcPOU/.TcDUT/.TcGVL file (keeps the rest of the XML byte-identical, writes a .bak, drops the object's stale ). Use when XAE is closed or for batch edits; otherwise prefer xae_pou_set. Written also while the attached XAE has the project open — the result then says what that means (xae_open).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "proj_set_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| declaration | No | ||
| strip_lineids | No | ||
| implementation | No | ||
| regenerate_lineids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||