Grasshopper

algorithmic modeling for Rhino

Hi everyone and many thanks for taking the time for reading my question.

My problem is that i really don't know how to use correctly the evaluate component because sometimes it works and others don't.

Actually i'm developing a simple definition, but as long as i write something in the expression editor it turns red and somethimes i make the same process and it works without problem.

maybe im making a simple mistake but i'm new at GH.

Kind regards.

Views: 6387

Replies to This Discussion

Grasshopper expressions are loosely based on VBScript syntax, with a few additional features. When you have an expression which either contains a syntactic problem (missing bracket for example) then you should get an error that describes the problem.

Other times the expression is syntactically valid but still fails when it is evaluated because the data types of variables are not consistent with some operation. For example you can use the minus symbol to subtract two numbers, but you cannot subtract text from numbers. Hence "a-b" is a valid expression only when a and b are in fact subtractable.

Without a specific example that fails I cannot be more informative though.

Hi D. Rutten, i replied as soon as i could, once again many thanks for taking the time to answer my question, bun i have the same problem with the evaluate component.

Image 1- I develop the "GH definition" without problem, and i conect any componen to evaluate's input.

Image 2- it seems to be alright but inmediately turns red; It does not matter if i use the expression editor or a "panel".

Image 3- I closed Rhinoceros, i did the same expression and i got the same result, bun then i changed to another more simple expression and it worked,

Image 4-I change to the expression desired and it work.

So my question is about if im making a mistake or theres a problem with my software...

Kind regards.

Read this first! How to get help on this forum.

There is a small box at the top-right corner of the red 'Eval' component that contains the error message; click on it and tell us what it says?

Edit: apparently part of my last post was lost...

How did you enter those superscripts?  Try 'Pow(x,2)' and 'Pow(y,2)'.

Like this:

 

Hi, my mistake, i didn't put the "+" but anyway sometimes it works and other doesn't, and in the following image, the one which has the expression editor open, shows my question that sometimes i make the same steps and turns red.
in other example i wrote x potence 2, and as simple as this the component turned red.

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