Grasshopper

algorithmic modeling for Rhino

Relatively simple question (I think).

I'm currently using python to check combinations of SliderValues to check for lowest MaxDev. Attached you will find the script that sets the sliders.

I was wondering though, how can I then print the values of the sliders (or any other block for that matter) to a text file. I know how to print to .txt, but I don't know the command that will let me read the block value in Grasshopper. My text file will have to look something like this:

Value1 Value2 Value3 MaxDev
1        1         1        0.5

1        1         2        0.44

etc...

Views: 408

Replies are closed for this discussion.

Replies to This Discussion

with open('yourfile', 'rb') as inf:

    for line in inf:

         print line

         # or do whatever you want

Ah! Sorry. Can't you just connect the sliders to GHPython component and read the values? Are you trying to brute force through all the possible combinations?

Hi,

Does this help?

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service