[{"data":1,"prerenderedAt":225},["ShallowReactive",2],{"/nw/save-to-string":3,"/nw/save-to-string-surround":214},{"id":4,"title":5,"body":6,"description":180,"extension":181,"meta":182,"navigation":200,"path":210,"seo":211,"stem":212,"__hash__":213},"content/nw/save-to-string.md","Networks Extension Dictionary: save-to-string",{"type":7,"value":8,"toc":169},"minimark",[9],[10,11,15,16,15,26,47,59,80,119,129,132],"div",{"className":12,"id":14},[13],"dict_entry","save-to-string","\n  ",[17,18,20,21,15],"h3",{"id":19},"nwsave-to-string","\n    ",[22,23,25],"a",{"href":24},"#save-to-string","nw:save-to-string",[27,28,32],"h4",{"id":29,"className":30},"nwsave-to-string-format",[31],"section-heading",[22,33,20,37,15],{"className":34,"href":36},[35],"section-anchor","#----nwsave-to-string-format--",[38,39,42,43],"span",{"className":40},[41],"prim_example","nw:save-to-string ",[44,45,46],"i",{},"format",[48,49,50,51,58],"p",{},"Serialize the current network context to a string in the given format and report it, rather than writing to a file. This is the counterpart to ",[22,52,54],{"href":53},"#nwload-from-string",[55,56,57],"code",{},"nw:load-from-string",", and is useful in NetLogo Web and other contexts where the result needs to go somewhere other than the file system.",[48,60,61,62,64,65,67,68,71,72,75,76,79],{},"The ",[55,63,46],{}," argument names the format explicitly and takes the same values as ",[55,66,57],{},". It is case-insensitive and an optional leading dot is ignored, so ",[55,69,70],{},"\"gml\"",", ",[55,73,74],{},"\"GML\"",", and ",[55,77,78],{},"\".gml\""," are all equivalent. The supported formats are:",[81,82,83,89,94,99,104,109,114],"ul",{},[84,85,86],"li",{},[55,87,88],{},"dl",[84,90,91],{},[55,92,93],{},"gdf",[84,95,96],{},[55,97,98],{},"gexf",[84,100,101],{},[55,102,103],{},"gml",[84,105,106],{},[55,107,108],{},"graphml",[84,110,111],{},[55,112,113],{},"matrix",[84,115,116],{},[55,117,118],{},"vna",[48,120,121,122,124,125,128],{},"Aside from reporting a string instead of writing to a file, ",[55,123,25],{}," behaves exactly like the corresponding ",[55,126,127],{},"nw:save-*"," primitive, with the same limitations regarding attributes and multigraphs.",[48,130,131],{},"For example, to save a network and hand it off to a browser download in NetLogo Web:",[133,134,135],"pre",{},[55,136,137,143,144,143,148,143,151,155,158,143,162,143,166],{},[38,138,142],{"className":139},[140,141],"token","command","let"," ",[38,145,103],{"className":146},[140,147],"variable",[38,149,25],{"className":150},[140,147],[38,152,70],{"className":153},[140,154],"string",[156,157],"br",{},[38,159,161],{"className":160},[140,147],"send-to:file",[38,163,165],{"className":164},[140,154],"\"my-network.gml\"",[38,167,103],{"className":168},[140,147],{"title":170,"searchDepth":171,"depth":172,"links":173},"",5,3,[174],{"id":19,"depth":172,"text":175,"children":176},"\n    nw:save-to-string\n  ",[177],{"id":29,"depth":178,"text":179},4,"\n    nw:save-to-string format\n  ","Documentation for the save-to-string primitive.","md",{"source":183,"metadataOutputPath":184,"projectConfig":185,"language":193,"inheritFrom":201,"output":200,"version":186,"layout":202,"dictionaryDisplayName":203,"dictionaryHomeDirectory":204,"indexFileURI":205,"currentItemId":14,"currentItemLabel":25,"primRoot":206,"icon":207,"extensionName":208,"assetsRoot":188},"../../external/extensions/nw/nw/save-to-string.md","content/nw/save-to-string.metadata.yaml",{"version":186,"projectRoot":187,"scanRoot":188,"outputRoot":189,"defaults":190,"engine":196,"partials":197,"dedupeIdenticalDiskWrites":200},"7.1.0-alpha1",".","/home/jason/Desktop/Development/NetLogo/branches/NetLogo/main2/helio/external/extensions/nw","content",{"inheritFrom":191,"language":193,"output":194,"extension":181,"title":195,"version":186},[192],0,"en",false,"NetLogo User Manual","mustache",{"directoryPaths":198,"extensions":199},[187],[196,181],true,[192],"catalog","Networks Extension Dictionary","/nw.html","/_index/extensions/nw.txt","nw","i-lucide-network",{"shortName":206,"fullName":209},"Networks","/nw/save-to-string",{"title":5,"description":180},"nw/save-to-string","AWc3ZUNL4PQoJQmysS8brWhImXne6S4d2QUio4qHWcU",[215,220],{"title":216,"path":217,"stem":218,"description":219},"Networks Extension Dictionary: save-matrix","/nw/save-matrix","nw/save-matrix","Documentation for the save-matrix primitive.",{"title":221,"path":222,"stem":223,"description":224},"Networks Extension Dictionary: set-context","/nw/set-context","nw/set-context","Documentation for the set-context primitive.",1786664298698]