Quantcast
Channel: Grasshopper - McNeel Forum
Viewing all articles
Browse latest Browse all 39513

Persisting data that is dynamically generated in Python component

$
0
0

@Matthew_Breau wrote:

Hey all,
I'm working on developing a grasshopper plugin using the Rhino 6 WIP (so that I can write the plugin using python).

I am trying to work out how to persist an array of text values each time a gh definition is saved. The text values would contain information about the user who is saving the file.

By persistence, I mean that I'd like these values to be part of the file itself. Basically if the definition is opened on another computer, the values can be read, but if the file is saved using the new computer, the values will be automatically overwritten.

I found this thread from 2014:
http://www.grasshopper3d.com/forum/topics/data-persistence-in-gh-components

Is the correct approach? If so, could someone elaborate on where the question asker's code came from? Will including a write() method in a class be sufficient? Is some other approach better, if being executed in python?

Many thanks

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 39513

Trending Articles