Hi all.
I have a .gh project where a small script read data from a xls file, than the output is managed with vanilla GH components. The data is always treated as simple text.
Then, at this step, it is converted to a number:
but it fails when first loading the .gh file.
I tried to internalize the data, but the bug doesn’t occur in that case.
I can’t share the script or the xls file…
If I manually re-connect from C data param to C number param, the conversion is correct.
My guess is that, while the .gh load the first time, the xls reading script expire the document in a way that causes the number param to misbehave.
I can repeat this any amount of times, happens always.
Only once, the first time the .gh is opened.
After the first time, it never occurs again. I have to restart Rhino to replicate it again.
just a stupid thought -but it happened to me dozens of times- when importing text that might come from different keyboard layout / languages, some characters might not be recognised correctly (I mean at ascii-table level)
just out of curiosity I would try isolating that mysterious “.” while is still text, and replace it with a “.” typed from your keyboard, and see what happens
Inside my .xls reader I have a piece of code like this: .ToString().Replace(',', '.');
…because in italy we use commas as decimal separator .
So the “dot” is forced to be the actual dot from my keyboard…
There is a possibility that a plugin (re-)sets the localization to your computers default during initialization. After recomputation the invariant localization is set again. So this could explain, the behavior during first execution. Usually non-American developers are more aware of this problem, that is why I doubt its coming from Grasshopper. You could try to disable as much plugins as possible and see if this solved it. Have your written the Excel deserializer?