12/27/2022 0 Comments Netlogo booleanImport-a works particularly well in conjunction with the fetch extension, which converts file paths and URLs to their string contents. This means that your source for the world/drawing doesn't matter as long as it was converted into a meaningful string, import-a is perfectly happy to import it. With import-a, though, the import-a:world primitive accepts a string containing the plain text contents of the file as its argument, and import-a:drawing, import-a:pcolors, and import-a:pcolors-rgb accept base64-encoded plain text strings as their respective arguments. This is the only way to call import-world, and if your world is available at a URL, or you wanted to build the world file text from NetLogo code (for some ungodly reason), you will first need to convert those sources to files, and then run import-world. Recall that import-world will only import a world from a file on your computer you give it a string as an argument, and that string is treated as a file path. However, the primitives in this extension aim to be more flexible than the standard import-world. Functionally, there is little difference between, say, import-world and import-a:world. Import-a is an extension that supplies some primitives that complement import-drawing, import-pcolors, import-pcolors-rgb, and import-world. In short: A NetLogo extension for running import-* primitives from plain text and base64 strings, with NetLogo Web compatibility.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |