Hops, Strings and Texts

Hi @stevebaer

I would like to use Hops for testing some compute scripts. There I ran into one problem which has to deal with strings versus texts. when I have a grasshopper grasshopper script with simple number input I can both use the RH_IN input or the get number input. I can even leave the “get number input” away. Hops still does the job. So I can use the same file for testing with Hops as for puting on the server.

But with strings this does not work. When I use the RH_IN:-- input the text does not get gecognised as a string. So I have to make two inputs (one for compute and one for Hops) to make this definition work both in Hops as in Compute. It would be verry practical if or the hops input nodes automatically get recognised by compute, or that text and strings could work the same as number input.

By the way, Hops is a realy nice!

Hops ships with a copy of compute and uses this for solving definitions out of process. This is the same application that you would run on a server.

You should use the “Get” components instead of the RH_IN: named groups for both hops and compute. The only time you would need to use RH_IN: named groups is when there is no “Get” component for the type that you want to use (currently bools and planes would fall into this category.)

Hi @stevebaer,

But when I run the following definition (1) on compute:

With this python script input:

Grasshopper_Inputs = {
“1e”:2.25,
“2e”:3.5,
}

I get no results.
When I run the definition below (2):

I get the right result:

image

Are you running an older version of compute?

two weeks old I believe. Maybe three. Version 0.5.0

Ok, I’ll see if I can repeat the issue

I used this one to test:
optel.gh (3.8 KB)
Optel_Tester.py (1.6 KB)

What happens if you don’t prepend RH_IN: at the bottom of your test script?

afbeelding

Like this?

No does not work.

variable_tree = gh.DataTree(variable_name)

^^^ Does this work?

Yes that works. Thanks a lot!

1 Like