Libraries‎ > ‎Library‎ > ‎Miscellaneous‎ > ‎

Record view

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Save a snapshot of the current view to the file system. NETLOGO ONLY - DOES NOT WORK IN APPLETS.

End description

Record view

Begin NetLogo code:

substitute-text-area-for folder-path test1displayexport-view (word "folder-path" "/frame"                  but-first (word (100000 + round ticks)) ".png")

End NetLogo code

Variants

Typically this is enhanced to repeat on every tick. 

How this works

This uses the NetLogo primitive export-view to save a PNG file of the current  state of the view of the world. The reason for adding 100000 to the ticks and then removing the first digit is so the file names are chronologically ordered when sorted alphabetically. 

Related micro-behaviours

Record interface is similar to this but includes graphs, buttons, and other user interface elements.

History

This was implemented by Ken Kahn on 10 August 2012.

BehaviourComposer: ignore everything after this.