'Text could not be evaluated as an expression' - Grasshopper

Hello, I’m trying to use the multiplication component but I get the error - ‘Text could not be evaluated as an expression’. I assume it is because the panel component reads the field from my excel file as text rather than numbers? Is there a way to solve this?

(This is what I’m following and trying to do: https://www.arch.columbia.edu/gis/tutorials/importing-gis-data)

I’m using Rhino 5 and the latest release for grasshopper for rhino 5. Would highly appreciate help on the topic!!

Did you try to place a Number parameter container component between your panel and the A input? I guess this might convert the text to numbers. Otherwise please upload the definition as it is difficult to understand exactly what’s happening from here.

Hi Paul,

I tried to place a number component between my panel and the A component but that gave me another error as well.

I think the problem is that the panel reads the numbers as text. And there is a problem in converting that text to numbers.

By definition, do you mean the error message? Here’s screen shots:

Ok then can you please upload the definition? the data you want to manage seems to be a large tree and the panel does not reveal everything here. So I would need to have a proper look to see how that can be solved.
You can right click on the Data container component on the left and click on “Internalize data” so I won’t need any external files and you can send the gh def as it is.

1 Like

For Building extrusion.gh (112.7 KB)

Hi Paul. Thanks, I think I just understood what a definition is. Sorry, I’ve only been at this for 5 hours so please bear with me!

Let me know if you can open this?

The reason why it didn’t work is because you had <empty> elements in your list which can’t be interpreted as integers. You need therefore to get rid of it, one way or the other. The way I am handling it here is by iterating through the list of strings, checking if the length of the element is > 0 and if it’s the case, that element is not empty and can be added to the output list, which is then cleaned. There are other ways to do it natively in grasshopper, as explained in this thread. I isolated the problem and attached the bit of the definition that caused problem, you should be able to plug it to the main one!

For Building extrusion_fix.gh (15.3 KB)

1 Like

OH. Thank you so very much, Paul!! Let me plug this in and I can finally continue with my project!

1 Like

Same problem ! imageerror.gh (6.8 KB)

Removed null items but still shows the same error.

Your second panel has an invisible character at the beginning of “‪92903”:

txterror_2019Oct9a
txterror_2019Oct9a.gh (12.3 KB)

1 Like