How to export a variable containing a text list into my computer?

I'm trying to export a list as said by @jguille2 in this post:

So I did that:
Snap!Con2021_ArbreFractal_Vee_High_Resolution_1 script pic

But it doesn't work. I'm sorry but I don't know how to code with Javascript.
Thank you for any help.

it's possible

It's from LunarOS , check this:

untitled script pic (1)

Thanks @dardoro but it doesn't work.
Snap!Con2021_ArbreFractal_Vee_High_Resolution_1 script pic

Capture du 2021-08-19 16-30-09

It working?

Sorry, it saves a simple var containg text.
Complex structure like lists must be serialized to be saved.
List API has a methods to choose from, depending on further processing

asText()                - answer my elements (recursively) concatenated
asCSV()                 - answer a csv-formatted String of myself

according to my example : v.asJSON()

Yes @dardoro ! It works !!!

Thank you very much !!!

To import values from a file into a model, the file must contain the names of the variables in the model that you want to import values into, and the values that you want to import.

to import variables from a file, just drag and drop the file into snap, and then it'll create a new variable with the file name as the variable name. I don't get where you're getting "model" from.

solution is this reply:

It's one of those bots.

Snap! Build Your Own Blocks there is a block in there to save files in any ext

how do you know?

Every single one that has said something like that has been deleted because they were a bot.

it says 20 posts read.


crap I didn't see that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.