Grasshopper

algorithmic modeling for Rhino

Can anyone help me understand why I am not able to change the string values.  My goal is to change the Letter grades to a number grade.

Thanks for your help.

Views: 2968

Attachments:

Replies to This Discussion

When I use a panel with a single value for the "F - String to Replace" and another single value for the "R - String to Replace With" the component works as expected.  However, when I try using a lists of values for F and R,  it does not work at all.  What am I doing wrong?

Thanks

Hi Stan,

The Strings you are searching for is the complete list "A+AA-B+....F" and you don't have anything that looks like that. What you have in your other lists are separate "A+", "A", "A-" etc and "F"

You need to separate the first string into its components to create a unique "set" from which you can Find Similar Items to then replace using a List Item component.

Note that the Entwine and Tree Explode components is to reduce the same task for each set down to the fewest components

Attachments:

Nicely done.  I know I would have never come up with your approach.  The longer I practice GH (over 3 years), the more I realize how little I understand GH.  I wish there was a more efficient way to learn GH at a higher level other than just trial and error. There are a lot of novice and beginner courses but after that, the instruction is very limited.

Follow up Question: Was the 'Replace String' component working properly?  or was I not using it correctly?

Thank you so much Danny.

Stan

String replace will find any occurrence of the F input and put the R input in its place.

There for your version you had "A+AA-B+BB-......F" as the string to find and if it found it it would have put "989592888582......60" in its place

Brilliantly said, thanks again.

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