algorithmic modeling for Rhino
Hi.
I have been able to update my component using a timer/button, but what I really want is change my file in Inkscape and when my tab/component/grasshopper/rhino gets the focus again I want the file to be read automatically.
The button solution is okay, but if I can make GH update itself it is probably a bit nicer, since I can always CTRL+Z in Inkscape. (The timer makes the fan run more often.)
Tags:
Hi Marcus,
you could add an event handler to the Grasshopper window focus event, or you could add an event handler to the file itself. So that whenever the file changes, Grasshopper responds. In fact there is a synchronize option on the File parameter which does just this. So if you use a File parameter instead of a Text Panel, enable the Synchronize option and you should already be getting automatic updates.
If you want to know how to handle the Grasshopper focus event instead (though I can't type it in python, it'll have to be C# or VB) I can try and explain that too.
--
David Rutten
david@mcneel.com
I thought "File Path" is just a container for file names.
It is. But it also has the synchronization build in and it can expire parameters that depend on it whenever the file changes.
--
David Rutten
david@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by