startup

startup Observer Command

User-defined procedure which, if it exists, will be called when a model is first loaded in the NetLogo application.

to startup
  setup
end

startup does not run when a model is run headless from the command line, or by parallel BehaviorSpace.

Take me to the full NetLogo Dictionary