[{"data":1,"prerenderedAt":274},["ShallowReactive",2],{"/nw/load-from-string":3,"/nw/load-from-string-surround":263},{"id":4,"title":5,"body":6,"description":230,"extension":231,"meta":232,"navigation":249,"path":259,"seo":260,"stem":261,"__hash__":262},"content/nw/load-from-string.md","Networks Extension Dictionary: load-from-string",{"type":7,"value":8,"toc":219},"minimark",[9],[10,11,15,16,15,26,60,76,94,133,150,153],"div",{"className":12,"id":14},[13],"dict_entry","load-from-string","\n  ",[17,18,20,21,15],"h3",{"id":19},"nwload-from-string","\n    ",[22,23,25],"a",{"href":24},"#load-from-string","nw:load-from-string",[27,28,32],"h4",{"id":29,"className":30},"nwload-from-string-format-data-default-turtle-breed-default-link-breed-optional-command-block",[31],"section-heading",[22,33,20,37,15],{"className":34,"href":36},[35],"section-anchor","#----nwload-from-string-format-data-default-turtle-breed-default-link-breed-optional-command-block--",[38,39,42,43,47,48,47,51,47,54,47,57],"span",{"className":40},[41],"prim_example","nw:load-from-string ",[44,45,46],"i",{},"format"," ",[44,49,50],{},"data",[44,52,53],{},"default-turtle-breed",[44,55,56],{},"default-link-breed",[44,58,59],{},"optional-command-block",[61,62,63,64,67,68,71,72,75],"p",{},"Load network ",[65,66,50],"code",{}," from an in-memory string rather than from a file. This is useful in NetLogo Web and other contexts where the data comes from somewhere other than the file system, such as the ",[65,69,70],{},"fetch"," or ",[65,73,74],{},"resource"," extensions.",[61,77,78,79,81,82,85,86,89,90,93],{},"Because there is no file name to infer the file-type from, the first argument, ",[65,80,46],{},", names the format explicitly. It is case-insensitive and an optional leading dot is ignored, so ",[65,83,84],{},"\"gml\"",", ",[65,87,88],{},"\"GML\"",", and ",[65,91,92],{},"\".gml\""," are all equivalent. The supported formats are:",[95,96,97,103,108,113,118,123,128],"ul",{},[98,99,100],"li",{},[65,101,102],{},"dl",[98,104,105],{},[65,106,107],{},"gdf",[98,109,110],{},[65,111,112],{},"gexf",[98,114,115],{},[65,116,117],{},"gml",[98,119,120],{},[65,121,122],{},"graphml",[98,124,125],{},[65,126,127],{},"matrix",[98,129,130],{},[65,131,132],{},"vna",[61,134,135,136,138,139,141,142,145,146,149],{},"Aside from taking its data from a string and its format from the ",[65,137,46],{}," argument, ",[65,140,25],{}," behaves exactly like the corresponding ",[65,143,144],{},"nw:load-*"," primitive, including matching node and edge attributes to turtle and link variables and honoring ",[65,147,148],{},"breed",".",[61,151,152],{},"For example, to load a GML network fetched from a URL:",[154,155,156],"pre",{},[65,157,158,47,164,169,170,173,174,179,182,183,47,186,47,189,47,192,47,196,200,202,203,173,207,47,210,47,215,218],{},[38,159,163],{"className":160},[161,162],"token","variable","fetch:url-async",[38,165,168],{"className":166},[161,167],"string","\"https://example.com/network.gml\""," [ [",[38,171,117],{"className":172},[161,162],"] ",[38,175,178],{"className":176},[161,177],"reporter","->",[180,181],"br",{},"  ",[38,184,25],{"className":185},[161,162],[38,187,84],{"className":188},[161,167],[38,190,117],{"className":191},[161,162],[38,193,195],{"className":194},[161,177],"turtles",[38,197,199],{"className":198},[161,177],"links",[180,201],{},"] [ [",[38,204,206],{"className":205},[161,162],"err",[38,208,178],{"className":209},[161,177],[38,211,214],{"className":212},[161,213],"command","print",[38,216,206],{"className":217},[161,162]," ]",{"title":220,"searchDepth":221,"depth":222,"links":223},"",5,3,[224],{"id":19,"depth":222,"text":225,"children":226},"\n    nw:load-from-string\n  ",[227],{"id":29,"depth":228,"text":229},4,"\n    nw:load-from-string format data default-turtle-breed default-link-breed optional-command-block\n  ","Documentation for the load-from-string primitive.","md",{"source":233,"metadataOutputPath":234,"projectConfig":235,"language":242,"inheritFrom":250,"output":249,"version":236,"layout":251,"dictionaryDisplayName":252,"dictionaryHomeDirectory":253,"indexFileURI":254,"currentItemId":14,"currentItemLabel":25,"primRoot":255,"icon":256,"extensionName":257,"assetsRoot":237},"../../external/extensions/nw/nw/load-from-string.md","content/nw/load-from-string.metadata.yaml",{"version":236,"projectRoot":149,"scanRoot":237,"outputRoot":238,"defaults":239,"engine":245,"partials":246,"dedupeIdenticalDiskWrites":249},"7.1.0-alpha1","/home/jason/Desktop/Development/NetLogo/branches/NetLogo/main2/helio/external/extensions/nw","content",{"inheritFrom":240,"language":242,"output":243,"extension":231,"title":244,"version":236},[241],0,"en",false,"NetLogo User Manual","mustache",{"directoryPaths":247,"extensions":248},[149],[245,231],true,[241],"catalog","Networks Extension Dictionary","/nw.html","/_index/extensions/nw.txt","nw","i-lucide-network",{"shortName":255,"fullName":258},"Networks","/nw/load-from-string",{"title":5,"description":230},"nw/load-from-string","YvZmhWRTmaYuSZ786RAwoNGu1pR1zPm1jZ1uyM4yprI",[264,269],{"title":265,"path":266,"stem":267,"description":268},"Networks Extension Dictionary: load","/nw/load","nw/load","Documentation for the load primitive.",{"title":270,"path":271,"stem":272,"description":273},"Networks Extension Dictionary: load-graphml","/nw/load-graphml","nw/load-graphml","Documentation for the load-graphml primitive.",1786664303308]