update_model
Replace the code of the currently loaded NetLogo model and reload it in place. Use when iterating on an existing model to keep the same window and avoid creating new files.
Instructions
Update the currently loaded model's code in place and reload it.
Prefer this over create_model when iterating on an existing model: the same .nlogox file is rewritten and reloaded, so the NetLogo window stays on one model and the models directory doesn't grow a new file per iteration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | New NetLogo procedures — a FULL replacement of the code tab, not a diff. Raw procedures only (no .nlogox XML). | |
| widgets | No | Optional new interface widgets (same schema as create_model). When omitted, the model's existing widgets are preserved unchanged — sliders keep their positions and values. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |