.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multilingual / Culture

1 REPLY 1
Reply
Message 1 of 2
mterwoord
343 Views, 1 Reply

Multilingual / Culture

Hi,

 

I'm working on a large .NET extension, which (amongst other things) produces reports. This addin is being used all over the world. The reports should be produced in the users' local culture.

 

So, before generating the reports, I set the Thread.CurrentThread.CurrentUICulture and the .CurrentCulture properties to the appropriate cultures. This works fine in AutoCAD 2010 and 2012. In 2014 it works fine as well, but when closing AutoCAD, I get an unhandled exception.

 

I reproduced the issue with the following command code:

    <CommandMethod("MyTestCommand", CommandFlags.Session)>
    Public Sub MyTestCommand()
        Dim cultureInfo = New CultureInfo("nl-nl")
        Thread.CurrentThread.CurrentUICulture = cultureInfo
        MessageBox.Show((0.2).ToString())
    End Sub

 

 What am I doing wrong here?

 

Thanks in advance!

 

Regards,

Matthijs ter Woord

 

1 REPLY 1
Message 2 of 2

You probably just need to revert the changes... check this example: http://adndevblog.typepad.com/autocad/2012/06/autocad-keeps-overriding-currentculture-and-currentuic...

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost