<?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 Converting from Architectural Units to Decimal Units eInvalidInput error in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9177830#M20702</link>
    <description>&lt;P&gt;I've been using the Runtime.Converter to convert units to display correctly in text boxes after a user selects a different unit via a combobox on the form.&amp;nbsp; When I have 1/2" in the textbox and try to convert it to decimal units (or any other unit for that matter) I get an eInvalidInput error.&amp;nbsp; This is only happening when I change from Architectural to something else.&amp;nbsp; All other conversions are working just fine.&amp;nbsp; I'm using&amp;nbsp; AutoCAD 2019 and the code is in C#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2019 18:43:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-02T18:43:30Z</dc:date>
    <item>
      <title>Converting from Architectural Units to Decimal Units eInvalidInput error</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9177830#M20702</link>
      <description>&lt;P&gt;I've been using the Runtime.Converter to convert units to display correctly in text boxes after a user selects a different unit via a combobox on the form.&amp;nbsp; When I have 1/2" in the textbox and try to convert it to decimal units (or any other unit for that matter) I get an eInvalidInput error.&amp;nbsp; This is only happening when I change from Architectural to something else.&amp;nbsp; All other conversions are working just fine.&amp;nbsp; I'm using&amp;nbsp; AutoCAD 2019 and the code is in C#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 18:43:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9177830#M20702</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-02T18:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from Architectural Units to Decimal Units eInvalidInput error</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9177943#M20703</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please provide code you are using for converting.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 19:28:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9177943#M20703</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2019-12-02T19:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from Architectural Units to Decimal Units eInvalidInput error</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9177979#M20704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should show a code "not working" snippet.&lt;/P&gt;
&lt;P&gt;This works for me (returns 0.5):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Converter.StringToDistance("1/2\"", DistanceUnitFormat.Architectural)&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Dec 2019 19:41:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9177979#M20704</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2019-12-02T19:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from Architectural Units to Decimal Units eInvalidInput error</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9178009#M20705</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get this exception if &lt;A href="https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-Core/files/GUID-D7C80D1F-B1C0-44A9-898E-B3100FF391CB-htm.html" target="_blank" rel="noopener"&gt;system variable&amp;nbsp; LUNITS&lt;/A&gt; different from 4 and you use short form of&lt;/P&gt;
&lt;DIV id="areafixed" class="Element710" style="width: 739px;"&gt;
&lt;DIV class="Element92"&gt;
&lt;DIV class="Element5"&gt;&lt;STRONG&gt;Converter.StringToDistance("1/2\"")&lt;/STRONG&gt; method instead of
&lt;DIV id="areafixed" class="Element710" style="width: 739px;"&gt;
&lt;DIV class="Element92"&gt;
&lt;DIV class="Element5"&gt;&lt;STRONG&gt;Converter.StringToDistance("1/2\"", DistanceUnitFormat.Architectural)&lt;/STRONG&gt; method&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Dec 2019 19:55:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9178009#M20705</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2019-12-02T19:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from Architectural Units to Decimal Units eInvalidInput error</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9180035#M20706</link>
      <description>&lt;P&gt;Sorry I was unable to post a code snippet - I believe I was simply using the 2nd parameter incorrectly.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 16:16:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-from-architectural-units-to-decimal-units/m-p/9180035#M20706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-03T16:16:24Z</dc:date>
    </item>
  </channel>
</rss>

