<?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: Restore the Previous selectionset in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5563042#M40787</link>
    <description>&lt;P&gt;That is exactly what I try in my workaround.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2015 10:48:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-30T10:48:51Z</dc:date>
    <item>
      <title>Restore the Previous selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5558726#M40785</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I often use Editor.SelectAll() (with a filter) to collect Entities in the drawing, cause it's much faster than iterating through all ObjectIds in the database and open each Entity to check it's properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now I have the following scenario: I use a Document.CommandEnded eventhandler to trap the MOVE command and update some BlockReferences afterwards. What happens is this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;The user selects a Polyline and moves it&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;My code collects some BlockReferences (with Editor.SelectAll) and updates them, not noticeable for the user.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;The user starts MOVE again and types "P" (Previous). Not the Polyline is selected, but the BlockReferences instead.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;For now I handle this by clearing the last selectionset, like this: draw a point, call Editor.SelectLast(), then erase the point. I'm not using Editor.SetImpliedSelection(new ObjectId[0]) since it does not clear the Previous selection (due to Application-/DocumentContext issues?).&lt;/P&gt;&lt;P&gt;But the user is not satisfied with an empty set, he wants his previous selection back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my question is: Is it possible to prevent the resulting SelectionSet from being stored as the last Selectionset in the drawing, and leave the Previous selection intact?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also tried this&amp;nbsp;workaround:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Call Editor.SelectPrevious() to collect the Polyline in a SelectionSet SS -&amp;gt; works very well&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Collect the BlockReferences with Editor.SelectAll()&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Using Editor.SetImpliedSelection(SS) -&amp;gt; doesn't do anything, the collection of BlockReferences still is the Previous selection&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone has a solution or workaround for this.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2015 15:35:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5558726#M40785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-26T15:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Restore the Previous selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5560012#M40786</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have no knowledge of NET (but I wish)&amp;nbsp; so I can only try some logic workaround&lt;/P&gt;&lt;P&gt;could you use your SS to make a new selection and have SelectPrevious get it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2015 07:25:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5560012#M40786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-27T07:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Restore the Previous selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5563042#M40787</link>
      <description>&lt;P&gt;That is exactly what I try in my workaround.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 10:48:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5563042#M40787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-30T10:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Restore the Previous selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5564818#M40788</link>
      <description>&lt;P&gt;I got&amp;nbsp;&lt;SPAN&gt;SetImpliedSelection working now, but also conclude this is no solution. The entities&amp;nbsp;get selected in the editor, but are not stored as a (previous) selectionset in the drawing. Only a&amp;nbsp;next&amp;nbsp;AutoCAD command will pick these entities and store it as a selectionset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe I can use COM for this, but then it would be my first COM implementation in .NET since&amp;nbsp;five years.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dear Autodesk people, will there be a .NET method Editor.SetPreviousSelection(SelectionSet ss) in the future?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 10:46:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/restore-the-previous-selectionset/m-p/5564818#M40788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-31T10:46:35Z</dc:date>
    </item>
  </channel>
</rss>

