Grasshopper

algorithmic modeling for Rhino

Can the variables hint in the expression editor reflect a valid syntax for the variable name even when show full names is activated?

Views: 2891

Replies to This Discussion

Any variable used in an expression can't have any spaces. If you rename Domain end to Domain_end it will work.

To be fair, it would be nice if there was a message that clearly said that a specific variable name is invalid. Another reason why always using x would be a good idea.

--

David Rutten

david@mcneel.com

Thanks David for your help, I am aware of that I was just asking if the hint or even the names on the components could be a valid syntax, instead of having to change it manually for every input or maybe the name could show as domain start(a), domain end(b) so you can always use the the short name as the variable in the expression?

I meant that I want to start using x for every parameter expression instead of the parameter nickname. That would make expressions more robust, more predictable and more easily reusable.

However until I do you'll have to use valid names for parameters.

--

David Rutten

david@mcneel.com

Yes that would be great, thanks for taking it into consideration.

I just changed this for Grasshopper 0.9.0067 (the next release).

All expressions inside parameters will now use 'x' instead of whatever the nickname was. Old files should be fixed automatically when opened, I hope I covered all the corner cases.

--

David Rutten

david@mcneel.com

I found this AMAZING, Thanks!

Hi David.

Yet (gh version 0.9.0076) I can see the problem.

Say, I do not have "Draw full names" active, I edit my Evaluate component with the expression (x*y)/2 and everything works.

Then I switch to "Draw full names" and the Evaluate component still works but, if I copy-paste the component or edit the expression or try to put the same expression in a new Evaluate component, it turn red.

Am I missing something?

Thanks :)

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service