Home
Learn NetLogo
What is NetLogo? Tutorial #0 Sample Model Tutorial #1 Models Tutorial #2 Commands Tutorial #3 Procedures
Documentation
NetLogo Dictionary Interface Guide Interface Tab Guide Info Tab Guide Code Tab Guide Programming Guide Transition Guide Preferences Guide Version History
Advanced Tools
Extension Manager Shapes Editor BehaviorSpace System Dynamics HubNet HubNet Authoring Logging Controlling Mathematica Link NetLogo 3D Cluster Computing (HPC)
Extensions
Extensions Guide Arduino Array Bitmap CSV GIS GoGo LevelSpace Matrix Networks Palette Profiler Python Resource Rnd Sound Simple R Table Time Vid View2.5D
FAQ
Home
Learn NetLogo
What is NetLogo? Tutorial #0 Sample Model Tutorial #1 Models Tutorial #2 Commands Tutorial #3 Procedures
Documentation
NetLogo Dictionary Interface Guide Interface Tab Guide Info Tab Guide Code Tab Guide Programming Guide Transition Guide Preferences Guide Version History
Advanced Tools
Extension Manager Shapes Editor BehaviorSpace System Dynamics HubNet HubNet Authoring Logging Controlling Mathematica Link NetLogo 3D Cluster Computing (HPC)
Extensions
Extensions Guide Arduino Array Bitmap CSV GIS GoGo LevelSpace Matrix Networks Palette Profiler Python Resource Rnd Sound Simple R Table Time Vid View2.5D
FAQ

Resource

Using

Purpose

The resource extension allows you to retrieve the contents of files that are bundled with a model. Bundled resources, which were added in NetLogo 7, provide a way to use the contents of other files in a model without needing to send the files alongside the model. When you add a resource to a model, the contents of the source file are stored in the model file.

For details on bundled resources, see Resource Manager.

Getting Started

The resource extension comes pre-installed with NetLogo. To use the resource extension in your model, add a line to the top of your Code tab:

extensions [resource]

If your model already uses other extensions, then it already has an extensions line in it, so just add resource to the list.

For more information on using NetLogo extensions, see the Extensions Guide

Primitives

Looking for the primitive reference for the Resource extension? You can find the full reference here.

resource:get resource:list

All Primitives

resource:get

resource:get name

Reports the contents of the resource whose name matches the input string. If the resource is plain text, the contents will be reported as such. Otherwise, the contents will be reported as a Base64 string. An error will be thrown if the specified resource does not exist.

resource:list

resource:list

Reports a list of names of the bundled resources present in the model.


NetLogo is a programmable modeling environment for simulating natural and social phenomena. It was authored by Uri Wilensky in 1999 and has been in continuous development ever since at the Center for Connected Learning and Computer-Based Modeling.

Related Links
  • NetLogo Home
  • CCL Home
  • NetLogo Web
  • NetTango Web
  • NetLogo 3D
  • BehaviorSearch
  • Contact Us

Copyright © 1999-2025 Uri Wilensky and the Center for Connected Learning and Computer-Based Modeling at Northwestern University . All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License , or (at your option) any later version.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at netlogo-commercial-admin@ccl.northwestern.edu .

For more information, visit the NetLogo website .