import-world1.0
import-world filename
Reads the values of all variables for a model, both built-in and user-defined, including all observer, turtle, and patch variables, from an external file named by the given string. The file should be in the format used by the export-world primitive.
Note that the functionality of this primitive is also directly available from NetLogo's File menu.
When using import-world, to avoid errors, perform these steps in the following order:
- Open the model from which you created the export file.
- Press the Setup button, to get the model in a state from which it can be run.
- Import the file.
- Re-open any files that the model had opened with the
file-open
command. - If you want, press Go button to continue running the model from the point where it left off.
If you wish to import a file from a location other than the model's location, you may include the full path to the file you wish to import. See export-world for an example.
Note: This primitive is not compatible with NetLogo Web. If you wish to import a world with the same code and the same behavior in both NetLogo and NetLogo Web, see import-a:world.
Take me to the full NetLogo Dictionary