Acces Set streaming destination & Stream contents from code

I have a bunch of panels in grasshopper which we stream to a file location which we set up manually. I’m wondering if there is a way to do this using code. So that I have one component where I connect a button to and when that buttons gets pressed I get asked for a specific file location. I believe I can figure out how to make that button activate the prompt for asking for a path location, but I’m wondering how to access “Set streaming destination” and “Stream contents” options which you get when you right click on a panel. Anybody have an idea of where to look or an example file?

I’m a bit familiar with python & c# but not advanced

I just realized another solution would be to just take the input that goes into the panel and input it into a python or c# component and let that stream to a specific location. Anybody have an idea on how to have the file be updated automatically when the input changes? (As in what the “Stream contents” does?)

This could be one way using the ghpython components. Although i rarely use streaming and I’m not sure how the filemodes other then .txt work…

streamContent.gh (430.9 KB)

2 Likes

Thanks!
I ended up using a similar solution:


I’ll use the standard grasshopper “path” component to set the directory for all panels and then a toggle to activate streaming.