Getting a NetLogo model to work in CODAP

CODAP Forums CODAP Help Forum Getting a NetLogo model to work in CODAP


Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
  • #368 Score: 0

    I’m from Buenos Aires, Argentina. I’m an educational technology consultant and a big fan of Concord.
    How can I integrate my own NetLogo simulation model into CODAP so I can use the data?
    Right now, I’m able to embbed the NetLogo simulation in a CODAP page but that doesn’t automatically allow me to drag & drop simulation attributes to a table to be able to graph them.
    I saw there are some examples with the Wolf-Sheep simulation and many others but I don’t know how to connect my own model.
    I also know that this was possible a year ago but then NetLogo modified substantially their HTML structure.
    Did you finally find a workaround?
    Thanks for your help.

    <div dir=”ltr”>

    Bill Finzer

    Hello Christián,

    NetLogo Web now has the ability to add CODAP integration as an extension. To learn about this, take a look at the slide presentation that Kit Martin of the NetLogo group did last February. It’s in this folder.

    I hope that has what you need. It’s pretty cool! You don’t have to mess with the html at all.



    Hi Bill, thanks for sharing this. I’ve read through all the explanation but I don’t get the “extensions” thing. In the document says:

    Extensions to call
    extensions [codap nlmap]

    From where do I have to call these extensions?

    Thanks for your help.


    Dan Damelin

    Hi Cristian,

    Kit put an example NetLogo model in his slides found here:

    If you open that link and then look at the NetLogo code there (by clicking on the “Netlogo Code” button below the model),  I think you will see the example of what needs to be added.


    • This reply was modified 4 years, 10 months ago by Dan Damelin.

    Thanks so much Dan. Now I got it. My problem now is that CODAP doesn’t allow me to load the URL where I have placed my model.

    My model is here:

    If I import that URL into CODAP it shows me a sad face. See my screenshot:


    [caption id="" align="alignnone" width="341"] I’ve never seen before this error. Is it something related to a new Chrome or CODAP update?[/caption]

    Thanks for your help.

    Dan Damelin

    Cristian, there are two issues with the link.

    1. There doesn’t seem to be a model there. When I click on the link I get a 404 error, meaning the server says there is no file on the server that is referenced by that link. (is there a typo somewhere?)

    2. CODAP is typically loaded using a secure link, which means the URL starts with https:// (rather than http://), and it would need the URLs of the plugins (in this case your model) to also start with https. Many servers can do either URL. Hopefully, the one you use will allow secure links. If not, you might try changing the link you launch CODAP with to http://


    Thanks Dan. My model wasn’t available for you because I’ve changed its name temporarily, now it is online again.

    A couple of days before, I tried different models within the same servers and had no problem with CODAP showing them. That’s why I thought that the secure thing was something new on CODAP (I saw that even I use “http”, CODAP turns it into “https” also adding a “?lang=en” string at the end of the filename, try yourself if you want)

    The good news is that I modified my model code based on your directions and then hosted my file on GitHub (which is a secure server) and my model is working fine with CODAP!!

    See screenshot attached.

    Thanks a lot again!!


    I am also trying to integrate a NetLogo simulation model into CODAP, but I’m not able to follow the example mentioned earlier in this thread because the dropbox link no longer works.  Also I expect there to be updates due to new versions of both software environments.

    Do the codap and nlmap extensions still work in NeltLogo Web?  And if so, where can I find documentation on them?

    Is there a better way to integrate NetLogo and CODAP?

    Thanks for your help.

    Bill Finzer

    Hi Darren,

    I’m going to reach out to the NetLogo team so they can help us. Stay tuned.



    Hi Darren,

    We have developed an updated NetLogo CODAP integration guide. It includes instructions as well as links to example CODAP/NetLogo models used in high school curricula. Please reach out if you would like additional support on your model.


    Susan Hanisch


    I am trying to follow the NetLogo CODAP integration guide for one of my models.

    I stumble at the extension already – where do I find the NetLogo CODAP extension?

    thank you, Susi

    Bill Finzer

    Hi Susi,

    I believe by extensions the guide is referring to the first line of code. Here’s an example:

    extensions [codap nlmap]
        [ sick?                ;; if true, the turtle is infectious
    remaining-immunity   ;; how many weeks of immunity the turtle has left
    sick-time            ;; how long, in weeks, the turtle has been infectious
    age                 ;; how many weeks old the turtle is
    num-infections-left   ;; how many others the turtle may still infect

    It’s just the first line that is relevant to you here. It instructs NetLogo to load CODAP extensions.

    Hope this helps,


    Susan Hanisch

    Hi Bill,

    thanks for your response!

    Yes, I have added the extensions code at the top.

    The issue is that I immediately get an error message:

    “Can’t find extension: codap”

    The codap extension is not listed under the extensions manager in NetLogo. Googling “NetLogo codap extension” does not give me any answers.

    Interestingly though, it appears that the html version works just fine and according to this site

    the codap extension seems to be included in NetLogo web. So I guess one has to ignore that error message when editing the code in the nlogo-Version.

    Maybe this note could be added to the NetLogo CODAP integration guide  though.



    Bill Finzer

    Hi Susi,

    That makes sense because desktop NetLogo has no way to include an extension meant to be used in a browser.

    I’ll advise Sally of your suggested revision.

    Thanks, Bill

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.