<?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: Is it possible to make ObjectId as SelectionFilter in the selection set? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383227#M11888</link>
    <description>&lt;P&gt;Because I want to select other same type(class) entitys in the worlddraw event, but not to select itself. Once selected by the selection set, it seems to trigger the bug, regardless of how the selection result is handled later.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Aug 2022 13:48:40 GMT</pubDate>
    <dc:creator>iamhermit</dc:creator>
    <dc:date>2022-08-26T13:48:40Z</dc:date>
    <item>
      <title>Is it possible to make ObjectId as SelectionFilter in the selection set?</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11382781#M11886</link>
      <description>&lt;P&gt;I didn't find the ObjectId key in the DxfCode.&lt;/P&gt;&lt;P&gt;As to why, because SelectAll would be select itself in WorldDraw(), leads to a catastrophic bug when copying, so I needed to exclude its own id from the selection.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 09:32:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11382781#M11886</guid>
      <dc:creator>iamhermit</dc:creator>
      <dc:date>2022-08-26T09:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to make ObjectId as SelectionFilter in the selection set?</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383188#M11887</link>
      <description>&lt;P&gt;I am confused: the purpose of using Editor.SelectXXXX (with or without filter) is to get a set of entities (referred by their ObjectIds). If you already know the ObjectId or ObjectIds, why do you need to use it/them as filter to get them back from calling Editor.SelectXXXX()?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 13:33:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383188#M11887</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-08-26T13:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to make ObjectId as SelectionFilter in the selection set?</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383227#M11888</link>
      <description>&lt;P&gt;Because I want to select other same type(class) entitys in the worlddraw event, but not to select itself. Once selected by the selection set, it seems to trigger the bug, regardless of how the selection result is handled later.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 13:48:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383227#M11888</guid>
      <dc:creator>iamhermit</dc:creator>
      <dc:date>2022-08-26T13:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to make ObjectId as SelectionFilter in the selection set?</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383333#M11889</link>
      <description>&lt;P&gt;So, you want to select&amp;nbsp; entities with "type" filter" but exclude one(s) with given ObjectId(s). You can handle Editor.SelectionAdded event to see if the added entities include the said ObjectId(s) and remove it/them if necessary. Or you can simply check the selection result, after the selection is done and before you pass the selection set for next execution, and removed the tagetted ObjectId(s). I'd go with latter, it is simple and straightforward:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if (selResult.Status == PromptStatus.OK)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; var ids=selResult.Value.GetObjectIds().ToList();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (ids.Contains(exclusiveId))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; ids.Remove(excusiveId);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DoSomeThing(ids);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 14:33:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383333#M11889</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-08-26T14:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to make ObjectId as SelectionFilter in the selection set?</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383388#M11890</link>
      <description>&lt;P&gt;I mentioned that the bug will be triggered as soon as itself is selected, so the second option seems not applicable.&lt;/P&gt;&lt;P&gt;As for SelectionAdded event, it is a new idea, I will try to verify if it can avoid the problem, and reply to you when the test results are available, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 14:51:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383388#M11890</guid>
      <dc:creator>iamhermit</dc:creator>
      <dc:date>2022-08-26T14:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to make ObjectId as SelectionFilter in the selection set?</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383455#M11891</link>
      <description>&lt;P&gt;OK, while you did not say how your WorldDraw() is called (possibly an override of "automatic execution", such as overrule...), it seems to me it is called automatically by AutoCAD whenever something is selected. In this case, I am not sure SelectionAdded event would help. In this case, you should do something inside your overridden WorldDraw() to exclude certain ObjectId (of course it should be in application/global scope) before the WorldDraw() runs into it (say, before you call base.WorldDraw()).&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:15:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-possible-to-make-objectid-as-selectionfilter-in-the/m-p/11383455#M11891</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-08-26T15:15:05Z</dc:date>
    </item>
  </channel>
</rss>

