save_model
Save NetLogo model code to a .nlogox file for opening in the desktop app, enabling live visualization with GUI, sliders, and animation.
Instructions
Save NetLogo model code to a .nlogox file in the models directory.
This saves the model so you can open it in the NetLogo desktop app for live visualization with GUI, sliders, and real-time animation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | NetLogo model code (procedures only — envelope added automatically). Or provide a full .nlogox XML file. | |
| name | Yes | Filename for the model (without extension). | |
| widgets | No | Optional interface widgets — same schema as create_model (slider/switch/button/monitor). Slider/switch widgets DEFINE their variable; don't also declare it in `globals [...]`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |