<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: User Interface Language in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245628#M177</link>
    <description>&lt;P&gt;Sorry for the confusion.&lt;/P&gt;&lt;P&gt;I have an Excel VBA application that interacts with Autocad.&lt;/P&gt;&lt;P&gt;This application is intended to be used in different Autocad environments (English/French/German...)&lt;/P&gt;&lt;P&gt;When running the VBA code, I wanted to get the language of the open Autocad instance on the user's machine.&lt;/P&gt;&lt;P&gt;This information will be used in "sendcommand" instruction to this instance.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;- The Purge command requires language-dependent arguments :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AcadDoc.SendCommand "_-Purge" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;All&lt;/STRONG&gt;" &amp;amp; vbCr &amp;amp; "*" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;Y&lt;/STRONG&gt;" &amp;amp; vbCr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For "English" Autocad&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AcadDoc.SendCommand "_-Purge" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;TO&lt;/STRONG&gt;" &amp;amp; vbCr &amp;amp; "*" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;O&lt;/STRONG&gt;" &amp;amp; vbCr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For "French" Autocad&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;gt; Calling GetVariable("Locale") for an active document will do the work.&lt;/P&gt;&lt;P&gt;I was just wondering why there was no such property directly for the application object, before opening a document...&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2025 16:25:54 GMT</pubDate>
    <dc:creator>faisal.aaouatif</dc:creator>
    <dc:date>2025-01-06T16:25:54Z</dc:date>
    <item>
      <title>User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245367#M175</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is there a way to get the user interface language of a running AutoCAD application without having to go searching in the windows registry?&lt;/P&gt;&lt;P&gt;I didnt found a property doing so.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 14:46:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245367#M175</guid>
      <dc:creator>faisal.aaouatif</dc:creator>
      <dc:date>2025-01-06T14:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245471#M176</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/899296"&gt;@faisal.aaouatif&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;... &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;EM&gt;user&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;interface language of a running AutoCAD application&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not sure what do you mean here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean that if an custom CAD application available in AutoCAD, you want to know which PROGRAMMING LANGUAGE is used to build the Cad app? There are different CAD apps that can be developed by different programming languages: AutoLISP/Visual LISP, VBA, .NET languages (C#, VB.NET and others), C/C++. Most of them can be recognized by the file extension (*.lsp, *.fas, *.dvb, *.dll, *.arx, *crx,...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to explain what exactly you'd like to know in plain English.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 15:25:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245471#M176</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2025-01-06T15:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245628#M177</link>
      <description>&lt;P&gt;Sorry for the confusion.&lt;/P&gt;&lt;P&gt;I have an Excel VBA application that interacts with Autocad.&lt;/P&gt;&lt;P&gt;This application is intended to be used in different Autocad environments (English/French/German...)&lt;/P&gt;&lt;P&gt;When running the VBA code, I wanted to get the language of the open Autocad instance on the user's machine.&lt;/P&gt;&lt;P&gt;This information will be used in "sendcommand" instruction to this instance.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;- The Purge command requires language-dependent arguments :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AcadDoc.SendCommand "_-Purge" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;All&lt;/STRONG&gt;" &amp;amp; vbCr &amp;amp; "*" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;Y&lt;/STRONG&gt;" &amp;amp; vbCr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For "English" Autocad&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AcadDoc.SendCommand "_-Purge" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;TO&lt;/STRONG&gt;" &amp;amp; vbCr &amp;amp; "*" &amp;amp; vbCr &amp;amp; "&lt;STRONG&gt;O&lt;/STRONG&gt;" &amp;amp; vbCr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For "French" Autocad&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;gt; Calling GetVariable("Locale") for an active document will do the work.&lt;/P&gt;&lt;P&gt;I was just wondering why there was no such property directly for the application object, before opening a document...&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 16:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245628#M177</guid>
      <dc:creator>faisal.aaouatif</dc:creator>
      <dc:date>2025-01-06T16:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245666#M178</link>
      <description>&lt;P&gt;So, you just want to get the system variable "LOCALE" before calling AcadDoc.SendCommand().&lt;/P&gt;
&lt;P&gt;Yes, this is how the AutoCAD COM API works: the system variables can only be accessed vis AcadDocument.Get[Set]Varibale() method, regardless the a variable is drawing/document dependent or application dependent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, since you are to call SendCommand from an AcadDocument, which means you can only go ahead if there is a drawing open in AutoCAD anyway. So, you can always call AcadDocument.GetVariable("LOCALE") before proceed to call SendCommand(), right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 16:47:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245666#M178</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2025-01-06T16:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245755#M179</link>
      <description>&lt;P&gt;Exactly.&lt;/P&gt;&lt;P&gt;As I said&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was just wondering why there was no such property directly for the application object ( Since it is indeed an application property .. ) , before opening a document. But if is the way&amp;nbsp;&lt;SPAN&gt;AutoCAD COM API works, It is what it is.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot Norman.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 17:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245755#M179</guid>
      <dc:creator>faisal.aaouatif</dc:creator>
      <dc:date>2025-01-06T17:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245781#M180</link>
      <description>&lt;P&gt;Is there a need to know the locale before you open the document? If not, the as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;mentioned, using the document api is sufficient.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 17:49:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245781#M180</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2025-01-06T17:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245816#M181</link>
      <description>&lt;P&gt;When I need to loop over multiple drawings, I will have to query the local variable for each drawing on each iteration, instead of querying the application itself only once, before starting the processing.&lt;/P&gt;&lt;P&gt;May be querying the first drawing , store this data in a variable and use directly it for the others....&lt;/P&gt;&lt;P&gt;But this is not a big problem, because the solution offered by the Document API is also fast and simple.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 18:00:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13245816#M181</guid>
      <dc:creator>faisal.aaouatif</dc:creator>
      <dc:date>2025-01-06T18:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13246071#M182</link>
      <description>&lt;P&gt;Yes, you only get "Locale" value once at the very first drawing opening, or, probably before you open any target drawing - if the running AutoCAD session, which may or may not be launched by your Excel VBA code, does have an default/empty drawing there.&amp;nbsp; that is, you can do"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. connect to AutoCAD session, using GetObject()/CreateObject(), or new AcadApplication...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Test if AcadApplication.ActiveDocument is Nothing or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; a. If not, go ahead to get the value of "LOCALE"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; b. If yes, go ahead to open the first target drawing, then get the value of "LOCALE"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 20:12:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13246071#M182</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2025-01-06T20:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: User Interface Language</title>
      <link>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13246204#M183</link>
      <description>&lt;P&gt;Also, try to use the API whenever possible, I.e. ActiveDocument.PurgeAll&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 21:33:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/user-interface-language/m-p/13246204#M183</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-01-06T21:33:10Z</dc:date>
    </item>
  </channel>
</rss>

