Grasshopper

algorithmic modeling for Rhino

Dear all, most likly David since this ins totaly undocumented in SDK

I am trying to add some custom data saver automatisation. and using the following line to "copy" data from datasaver to a number param.

dataStore.AddVolatileDataTree(dataSaver.VolatileData); 

this seams to work fine. However when I save the file and reopen then the data is gone...

Any suggestions why?

Views: 454

Replies to This Discussion

VolatileData is erased whenever an object expires. It's where the current solution is kept. If you want to store data permanently, then you need to assign the PersistentData.

And how would that work?

I only get the reply that presistentData is read only...

Hallo David,

I managed but please could you explain the following:

loop1 i=0 ...

dataStore.PersistentData.EnsurePath(i);

loop2 ii=0

  adding data to List

end2

dataStore.PersistentData.AppendRange(tmp);

end1

this stores outputs a datatree?

PersistentData is a GH_Structure<T> where T is the type of the parameter. You should be able to cast the returned PersistentData to the correct GH_Structure<T> and then use MergeStructure to insert all your data in one go.

also, be careful with too much persistent data. it makes GH file sizes large which actually can be a HUGE pain because it slows down autosave, which happens every time you connect a wire or place a component. When it takes 2 seconds to "think" every time you do something, GH definitions become unusable and in some cases can even cause crashes on file open. As long as the data sets are small though this shouldn't be a problem.

Hallo Andrew,

thx for the hint, however it seams to be the best working solution to record and store Simualted annealing runs and to reuse them within Grasshopper in an easy way. I am filtering upfront so...

we are not talking about millions of numbers...

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service