Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5887

CDbl in French?

$
0
0

I have a Rhinoscript that reads a .ini file. But Rhinoscript doesn’t recognize the numerical result as a number if Rhino is running in French. Works perfectly in English.

If the input number from the ini file is an integer, there is no error, but if it is not, then this happens in the case where arrDensity(Y)=1.2:
Box pops up that says “Type incompatible CDbl” related to the line "Density = CDbl(arrDensity(Y)). I had Rhino pop up a box on the line above and it reports the value of arrDensity(Y) as “1.2”, but Rhinoscript seems to think this is not translatable to a double. I’m assuming this is because of “1.2” instead of “1,2”, but I don’t see how to fix this in my script.

Here is the bit (I can send it all if it helps…) arrDensity is read from the .ini file earlier in the script:

						Dim Y, TestMaterial, Density			
						Y = 0
						For Each TestMaterial In MaterialOptions
							If ObjectMaterial = TestMaterial Then
								Rhino.messagebox arrDensity(Y)
								Density = CDbl(arrDensity(Y))
							End If
							Y = Y + 1
						Next

6 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5887

Trending Articles