Grasshopper

algorithmic modeling for Rhino

Hi everybody!

I'm trying to work with the function if into one variable expression box.

The problem happens when I connect one string (one panel with multiple values grafted) to the "a" input: the expression editor gives me "Operator ≤ not defined for string and double" as you can see at the image bellow.

It seems to be a problem with just that kind of operator, because the addition and subtraction works fine, but just doesn't fit my approach.

Any ideas?

Thanks guys!

Views: 2794

Attachments:

Replies to This Discussion

GH has some internal logic to convert strings like "1.2" to numbers. This doesn't happen in the function component. 

Feed your string through a number param before feeding it to the function and GH schould do the conversion for you.

Thanks, Hannes!

That's exactly what I was missing.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service