read_class_source
Read or write the source code of a CLASS 2 class (.st) by class name, with optional .h file access. Writes require latin1 compatibility and a closed IDE.
Instructions
Read or write a CLASS 2 class source (.st) by class name, with optional .h access. Writes are latin1-validated and require the CLASS 2 IDE to be closed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 'read' returns the source; 'write' overwrites it. | |
| source | No | Full content to write to the .st file — must be latin1-compatible (write only). | |
| lcp_path | No | Absolute path to the .lcp file. Omit to use the selected project. | |
| class_name | Yes | Name of the CLASS 2 class (e.g. 'Palletizer'). | |
| header_source | No | Content to write to the .h file. Omit to leave it unchanged (write only). | |
| include_header | No | Also return the .h file contents (read only). Default false. |