A NetLogo extension for getting some special NetLogo values as strings, rather than writing them out to files.
The results of export-the:world
and export-the:view
can be easily re-imported later with the Import-A extension (i.e. import-a:world
and import-a:drawing
).
Prim Name | Arguments | Behavior |
---|---|---|
model |
Returns a string with the contents of the .nlogo file that would be generated by saving this model. Throws an error if called when running NetLogo headlessly. |
|
output |
Returns a string with the contents of the file that would be generated by export-output . |
|
plot |
plotName | Returns a string with the contents of the file that would be generated by export-plot (except for the interface global data). Throws an error if no plot with the name given by plotName exists. |
view |
Returns a string of the base64-encoded contents of the file that would be generated by export-view . |
|
world |
Returns a string with the contents of the file that would be generated by export-world . |
I tried running a primitive and printing it out to the Command Center, and now NetLogo is super slow! What happened?!
When exporting data with this extension, it is entirely possible that the exported string will end up being very large. The NetLogo Command Center does not take well to printing out very large strings, and will likely slow to a crawl if given one. However, do note that you can speed NetLogo back up again by clicking the "Clear" button next to the Command Center output window, thereby disposing of the enormously long string (and all other strings in the Command Center).
Open it in SBT. If you successfully run package
, export-the.jar
is created.
The NetLogo Export-The extension is in the public domain. To the extent possible under law, Uri Wilensky has waived all copyright and related or neighboring rights.