VBA and Languages (English, German, etc)

VBA and Languages (English, German, etc)

Anonymous
Not applicable
295 Views
2 Replies
Message 1 of 3

VBA and Languages (English, German, etc)

Anonymous
Not applicable
Is VBA code written for the English version of Autocad compatible with
German and other versions of Autocad. Or would it have to be translated for
each language.

Thank you,
JC
0 Likes
296 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Joe,

It's the same language, but here are a couple of things to watch out for;

SendCommand:
If you are using it to call any AutoCAD command, make sure you use the
underscore in front of the command name, "_Zoom", so that it uses the
untranslated command name.

Numeric Formatting:
In some countries, such as Germany, they use a comma as the decimal
character in number. You can see this by going to Windows Control Panel and
looking at the regional settings. AutoCAD is hard coded to ignore the
regional settings for numbers and stick with the decimal point.

The problem is that VBA still uses the regional settings. Try setting your
region to German(Germany), then set a breakpoint in your macro the first
place where you are dealing with doubles. You will see that VBA is using the
comma but AutoCAD uses the decimal point. You will hit all kinds of errors
in this situation. The only fix I know of is for your macro to temporarily
change the regional settings while it is running then change it back with
it's done. Perhaps someone else has a better soution. I hate the thought of
changing the system settings like that but I don't know of any other way.

Glen
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks for the info. Glen

JC

"Glen Albert" wrote in message
news:B027607DAC3E66EA003B8D91C0C5E25F@in.WebX.maYIadrTaRb...
> Joe,
>
> It's the same language, but here are a couple of things to watch out for;
>
> SendCommand:
> If you are using it to call any AutoCAD command, make sure you use the
> underscore in front of the command name, "_Zoom", so that it uses the
> untranslated command name.
>
> Numeric Formatting:
> In some countries, such as Germany, they use a comma as the decimal
> character in number. You can see this by going to Windows Control Panel
and
> looking at the regional settings. AutoCAD is hard coded to ignore the
> regional settings for numbers and stick with the decimal point.
>
> The problem is that VBA still uses the regional settings. Try setting your
> region to German(Germany), then set a breakpoint in your macro the first
> place where you are dealing with doubles. You will see that VBA is using
the
> comma but AutoCAD uses the decimal point. You will hit all kinds of errors
> in this situation. The only fix I know of is for your macro to temporarily
> change the regional settings while it is running then change it back with
> it's done. Perhaps someone else has a better soution. I hate the thought
of
> changing the system settings like that but I don't know of any other way.
>
> Glen
>
>
0 Likes