<?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 Modifying TextEditorSelection.Language Issue in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7813394#M27081</link>
    <description>&lt;P&gt;This is a follow up to this question yesterday:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/modifying-characterset-property-of-mtext-object/td-p/7810356" target="_blank"&gt;https://forums.autodesk.com/t5/net/modifying-characterset-property-of-mtext-object/td-p/7810356&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is it that I can change the string in the MText with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MText mtext = (MText)tr.GetObject(id, OpenMode.ForWrite);&lt;BR /&gt;TextEditor textEditor = TextEditor.CreateTextEditor(mtext);&lt;BR /&gt;textEditor.SelectAll();&lt;BR /&gt;TextEditorSelection sel = textEditor.Selection;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sel.InsertString("Some New Text");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which works OK, however if&amp;nbsp;I change the Language I get eInvalidInput&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sel.Language = (int)System.Windows.Forms.VisualStyles.TextMetricsCharacterSet.Russian;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am obviously misunderstanding something basic here, can anyone give me a pointer into the correct direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drew&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2018 18:49:30 GMT</pubDate>
    <dc:creator>drewj</dc:creator>
    <dc:date>2018-02-27T18:49:30Z</dc:date>
    <item>
      <title>Modifying TextEditorSelection.Language Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7813394#M27081</link>
      <description>&lt;P&gt;This is a follow up to this question yesterday:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/modifying-characterset-property-of-mtext-object/td-p/7810356" target="_blank"&gt;https://forums.autodesk.com/t5/net/modifying-characterset-property-of-mtext-object/td-p/7810356&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is it that I can change the string in the MText with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MText mtext = (MText)tr.GetObject(id, OpenMode.ForWrite);&lt;BR /&gt;TextEditor textEditor = TextEditor.CreateTextEditor(mtext);&lt;BR /&gt;textEditor.SelectAll();&lt;BR /&gt;TextEditorSelection sel = textEditor.Selection;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sel.InsertString("Some New Text");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which works OK, however if&amp;nbsp;I change the Language I get eInvalidInput&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sel.Language = (int)System.Windows.Forms.VisualStyles.TextMetricsCharacterSet.Russian;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am obviously misunderstanding something basic here, can anyone give me a pointer into the correct direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drew&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 18:49:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7813394#M27081</guid>
      <dc:creator>drewj</dc:creator>
      <dc:date>2018-02-27T18:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying TextEditorSelection.Language Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7813845#M27082</link>
      <description>&lt;P&gt;See the &lt;A href="http://help.autodesk.com/view/OARX/2018/ENU/?guid=OREF-AcDbTextEditorSelectionBase__insertString_AcString_" target="_blank"&gt;documentation for InsertString()&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you use this method, it invalidates the current selection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;This is a follow up to this question yesterday:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/modifying-characterset-property-of-mtext-object/td-p/7810356" target="_blank"&gt;https://forums.autodesk.com/t5/net/modifying-characterset-property-of-mtext-object/td-p/7810356&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is it that I can change the string in the MText with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MText mtext = (MText)tr.GetObject(id, OpenMode.ForWrite);&lt;BR /&gt;TextEditor textEditor = TextEditor.CreateTextEditor(mtext);&lt;BR /&gt;textEditor.SelectAll();&lt;BR /&gt;TextEditorSelection sel = textEditor.Selection;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sel.InsertString("Some New Text");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which works OK, however if&amp;nbsp;I change the Language I get eInvalidInput&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sel.Language = (int)System.Windows.Forms.VisualStyles.TextMetricsCharacterSet.Russian;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am obviously misunderstanding something basic here, can anyone give me a pointer into the correct direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drew&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 21:31:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7813845#M27082</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-02-27T21:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying TextEditorSelection.Language Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7814040#M27083</link>
      <description>&lt;P&gt;I have been doing one or the other, so in the case of changing the Language I am not using the InsertString, so that shouldn't be a problem right?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 22:26:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7814040#M27083</guid>
      <dc:creator>drewj</dc:creator>
      <dc:date>2018-02-27T22:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying TextEditorSelection.Language Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7814137#M27084</link>
      <description>&lt;P&gt;See the docs &amp;gt;&lt;A href="http://help.autodesk.com/view/OARX/2018/ENU/?guid=OREF-AcDbTextEditorSelectionBase__setLanguage_Charset" target="_blank"&gt;here&lt;/A&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to that, eInvalidInput could be raised if the language isn't supported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the &lt;STRONG&gt;CanSupportLanguage()&lt;/STRONG&gt; method to check if the selection supports a given language.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;I have been doing one or the other, so in the case of changing the Language I am not using the InsertString, so that shouldn't be a problem right?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 23:29:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-texteditorselection-language-issue/m-p/7814137#M27084</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-02-27T23:29:56Z</dc:date>
    </item>
  </channel>
</rss>

