write_class_source
Apply code changes to CLASS 2 classes by writing source content back to .st and .h files. Use after reading class source to update method bodies, variables, and logic.
Instructions
Write the full source of a CLASS 2 class back to its .st file (and optionally its .h header). Use this after read_class_source to apply code changes — method bodies, variable declarations, logic — directly to the file. The IDE must be closed; use close_class2 first if needed. Content must be latin1-compatible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Full content to write to the .st file. Must be latin1-compatible. | |
| lcp_path | No | Absolute path to the .lcp file. Omit to use the selected project. | |
| class_name | Yes | Name of the CLASS 2 class to write (e.g. 'Palletizer'). | |
| header_source | No | Content to write to the .h file. Omit to leave the header unchanged. |