Grasshopper

algorithmic modeling for Rhino

Boolean toogle streaming number list contents to external file?

Hello Everyone.

Does anyone know if it is possible either with just grasshopper components or with GH components and VBscript to boolean toogle on and off the streaming of Number data to an external file for use later in the GH code?

I know that in the panel component that you can switch this on and off and when the streaming is switched off the external file stays filled with the last given set of numbers, though if you try and gate the panel and it becomes inactive the file disappears so this idea would not work.

The boolean toggle will be activated by a More Than (set) number component as this is denoting a base shape and the start lenghts of the structural components. with an increase past this number the lenghts will change which they can't do physically in the real world, thus the streaming of the file data must stop and be stored at the last point. So the base lenghts can be read from the file back into the code to keep the structural componets the same lenght as at the start so they slide past each other.

Another question is are there any file types that would keep the stored data in it trees or would they need to be re-mapped with the path mapper when read back into the GH code?

If toggling the stream content can only be done in VBscript could some explain what has to be written and why as code knowlege is still very basic though want to learn more and have yet to find out how i print a string to external file if that is what i am ment to be doing.

Thanks

Matt

Views: 747

Replies to This Discussion

I'm afraid a boolean toggle will not work in this case, as when you stop the flow of data to the panel it updates with a blank and still streams the new blank data. However, if you are using v43 you will be able to use the enable/disable toggles from the tool bar for the selected panel. This will achieve the desired affect (seen at the bottom of image below). But I suppose this is no better than manually stopping the stream function. This would be doable in VB or C# but i'm afraid my knowledge is limited to VBscript or RhinoScript at present. All you would need is a condition IF less than type thing. I'm sure someone from VB corner will see this thread but if they don't pitch your question there.

Hi Danny

I did not think it was possible either with just grasshopper components. The enable disable option is the same as just clicking on the Panel and clicking the stream contents on and off. The boolean switch which is not a switch as such but a more than number componet will just jave to go into a Activate boolean inside a VBscript that tells code to print list to file or Not.

Though i have not yet been able to find out what i have to write in the VBscript to Print the string out to an external file in the same way as the panel component does. So if anyone knows that Knowledge would be greatfull recevied

Thanks Again

Matt

Thanks

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