Save an array with skp file

Is there possibility to save an array (with data) with skp file?
And after reopen skp restore data from array?

Have a look at AttributeDictionary

First set up your array:

an_array=['a', 'b', 1, 2, 3.0123, true, false, another_array]

Now…

model=Sketchup,active_model
model.set_attribute("mamjankowski", "some_array_data", an_array)

Then later on

model=Sketchup,active_model
array = model.get_attribute(“mamjankowski”, “some_array_data”, )

Provided that the array’s data is in the same order it’s easily extracted…

1 Like

Thanks, it works.
I thought that in model attributes is not allowed to store an array.
I was wrong.

Most ‘objects’ in Sketchup can be given attributes [which can then be ‘retrieved’] - typically you might think of ‘containers’ like groups and component-instances, and of course raw geometry like edges and faces, but it can include the model-itself, and then its layers, definitions, materials, scenes etc, or their sub-parts like a definition etc…