<?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 Filter Pickfirst Selectionset in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5704583#M39458</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the pickfirst (UsePickSet) selection then filter that selection to make sure I'm only modifying a certain dynamic block.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;I have a selection filter set up for the named dynamic block (and use it for the ed.GetSelection method) but I don't know how to apply it to the returned pickfirst selection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jul 2015 03:51:54 GMT</pubDate>
    <dc:creator>SRSDS</dc:creator>
    <dc:date>2015-07-03T03:51:54Z</dc:date>
    <item>
      <title>Filter Pickfirst Selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5704583#M39458</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the pickfirst (UsePickSet) selection then filter that selection to make sure I'm only modifying a certain dynamic block.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;I have a selection filter set up for the named dynamic block (and use it for the ed.GetSelection method) but I don't know how to apply it to the returned pickfirst selection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 03:51:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5704583#M39458</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2015-07-03T03:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Pickfirst Selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5705730#M39459</link>
      <description>&lt;P&gt;It was easy enough to step through all the selected elements checking block names and adding them to an Idcollection.&lt;/P&gt;&lt;P&gt;Maybe I Just wondered if there was a more elegant way like the getselection filter.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2015 17:47:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5705730#M39459</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2015-07-04T17:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Pickfirst Selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5705796#M39460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With CommandFlags.UsePickSet, the selection filter passed to the EditorGetSelection() method is automatically applied to the active selection if any.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can with try this little snippet both ways: selecting blocks and other entites before or after launching the TEST command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;        [CommandMethod("Test", CommandFlags.UsePickSet)]
        public void Test()
        {
            Document doc = AcAp.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            TypedValue[] filter = { new TypedValue(0, "INSERT") };
            PromptSelectionResult psr = ed.GetSelection(new SelectionFilter(filter));
            if (psr.Status != PromptStatus.OK) return;&lt;BR /&gt;
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                foreach (SelectedObject obj in psr.Value)
                {
                    BlockReference br = (BlockReference)tr.GetObject(obj.ObjectId, OpenMode.ForWrite);
                    br.Color = Color.FromColorIndex(ColorMethod.ByAci, 30);
                }
                tr.Commit();
            }
        }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2015 21:03:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5705796#M39460</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2015-07-04T21:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Pickfirst Selectionset</title>
      <link>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5706002#M39461</link>
      <description>&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;That simplifies things.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was following an example I found which was different and made things slightly more complicated.&lt;/P&gt;&lt;P&gt;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2006/09/using_the_pickf.html" target="_self"&gt;http://through-the-interface.typepad.com/through_the_interface/2006/09/using_the_pickf.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2015 13:52:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/filter-pickfirst-selectionset/m-p/5706002#M39461</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2015-07-05T13:52:14Z</dc:date>
    </item>
  </channel>
</rss>

