<?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: Help using SelectionFilter in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452280#M71327</link>
    <description>Thanks again for the reply.&lt;BR /&gt;
&lt;BR /&gt;
I already have a solution in place that iterates through all the objects found in a "SelectAll" operation and finds the blocks I am looking for. I was hoping that filtering would provide a better solution that going through all the entities in the drawing, but I guess that's not the case.&lt;BR /&gt;
&lt;BR /&gt;
While we're on the subject, can I use filtering to retrieve any TEXT or MTEXT objects in the drawing? I am assuming I can since they aren't dynamic blocks.</description>
    <pubDate>Mon, 23 Mar 2009 03:09:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-03-23T03:09:26Z</dc:date>
    <item>
      <title>Help using SelectionFilter</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452276#M71323</link>
      <description>Hi all;&lt;BR /&gt;
&lt;BR /&gt;
Sorry if this is a basic question, but I can't for the life of me figure this out! I am writing my ACAD app in C# and I want to be able to select all objects in the currently open drawing that are blocks of a particular name. I have been trying to use selection filters for this, but I am not having any luck.&lt;BR /&gt;
&lt;BR /&gt;
I have attached my code below; could someone perhaps point me in the write direction? I always get a status ERROR when I run this. &lt;BR /&gt;
...&lt;BR /&gt;
TypedValue[] value = { new TypedValue(2, "PANEL") };&lt;BR /&gt;
SelectionFilter filter = new SelectionFilter(value);&lt;BR /&gt;
PromptSelectionResult selectAll = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.SelectAll(filter);&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
Here is a listing of one of the blocks in my drawing, for reference:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"BLOCK REFERENCE  Layer: "GR-SK-AR"&lt;BR /&gt;
 Space: Model space&lt;BR /&gt;
 Handle = d34&lt;BR /&gt;
 Block Name: "PANEL"&lt;BR /&gt;
 Anonymous Name: "*U10"&lt;BR /&gt;
 at point, X= 469.0271  Y=1062.0000  Z=   0.0000"&lt;BR /&gt;
&lt;BR /&gt;
Any help or guidance would be greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Sun, 22 Mar 2009 23:10:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452276#M71323</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-22T23:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help using SelectionFilter</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452277#M71324</link>
      <description>You need the DXF 0 entity type = INSERT in addition to the block name&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;MERIDIUS2000&gt; wrote in message news:6146641@discussion.autodesk.com...&lt;BR /&gt;
Hi all; Sorry if this is a basic question, but I can't for the life of me &lt;BR /&gt;
figure this out! I am writing my ACAD app in C# and I want to be able to &lt;BR /&gt;
select all objects in the currently open drawing that are blocks of a &lt;BR /&gt;
particular name. I have been trying to use selection filters for this, but I &lt;BR /&gt;
am not having any luck. I have attached my code below; could someone perhaps &lt;BR /&gt;
point me in the write direction? I always get a status ERROR when I run &lt;BR /&gt;
this. ... TypedValue[] value = { new TypedValue(2, "PANEL") }; &lt;BR /&gt;
SelectionFilter filter = new SelectionFilter(value); PromptSelectionResult &lt;BR /&gt;
selectAll = &lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.SelectAll(filter); &lt;BR /&gt;
... Here is a listing of one of the blocks in my drawing, for reference: &lt;BR /&gt;
"BLOCK REFERENCE Layer: "GR-SK-AR" Space: Model space Handle = d34 Block &lt;BR /&gt;
Name: "PANEL" Anonymous Name: "*U10" at point, X= 469.0271 Y=1062.0000 Z= &lt;BR /&gt;
0.0000" Any help or guidance would be greatly appreciated. Thanks!&lt;/MERIDIUS2000&gt;</description>
      <pubDate>Mon, 23 Mar 2009 00:11:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452277#M71324</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T00:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help using SelectionFilter</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452278#M71325</link>
      <description>Thanks for the reply. I changed my code to the following:&lt;BR /&gt;
&lt;BR /&gt;
TypedValue[] value = { new TypedValue(0, "INSERT"), new TypedValue(2, "PANEL") };&lt;BR /&gt;
&lt;BR /&gt;
and still received the error. I am wondering at this point about the block name. I am assuming that the block name in the listing I pasted above (from the "LS" command) is the same as the block name referred to in the DxfCode 2 - am I right in that? &lt;BR /&gt;
&lt;BR /&gt;
Any other suggestions or pointers greatly appreciated!</description>
      <pubDate>Mon, 23 Mar 2009 01:20:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452278#M71325</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T01:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help using SelectionFilter</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452279#M71326</link>
      <description>After going back and looking at your original post I see&lt;BR /&gt;
that the block is dynamic block.&lt;BR /&gt;
&lt;BR /&gt;
You can't filter for insertions of them because they are&lt;BR /&gt;
represented in the drawing by anonymous blocks. In the&lt;BR /&gt;
listing you showed, the 'Anonymous Name: "*U10"' is the&lt;BR /&gt;
actual name of the block.&lt;BR /&gt;
&lt;BR /&gt;
You can do this in one of several ways, both of them are&lt;BR /&gt;
fairly complicated, and they've been covered here in the&lt;BR /&gt;
pasts, so you should search the newsgroups for pointers&lt;BR /&gt;
on how to do this.&lt;BR /&gt;
&lt;BR /&gt;
Of course, we should all give Autodesk a big pat on the&lt;BR /&gt;
back for completely bungling this one, by failing to recognize&lt;BR /&gt;
the obvious functional requirement, and the impedement it&lt;BR /&gt;
imposes on their dear beloved AutoCAD customers.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;MERIDIUS2000&gt; wrote in message news:6146682@discussion.autodesk.com...&lt;BR /&gt;
Thanks for the reply. I changed my code to the following: TypedValue[] value&lt;BR /&gt;
= { new TypedValue(0, "INSERT"), new TypedValue(2, "PANEL") }; and still&lt;BR /&gt;
received the error. I am wondering at this point about the block name. I am&lt;BR /&gt;
assuming that the block name in the listing I pasted above (from the "LS"&lt;BR /&gt;
command) is the same as the block name referred to in the DxfCode 2 - am I&lt;BR /&gt;
right in that? Any other suggestions or pointers greatly appreciated!&lt;/MERIDIUS2000&gt;</description>
      <pubDate>Mon, 23 Mar 2009 01:54:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452279#M71326</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T01:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help using SelectionFilter</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452280#M71327</link>
      <description>Thanks again for the reply.&lt;BR /&gt;
&lt;BR /&gt;
I already have a solution in place that iterates through all the objects found in a "SelectAll" operation and finds the blocks I am looking for. I was hoping that filtering would provide a better solution that going through all the entities in the drawing, but I guess that's not the case.&lt;BR /&gt;
&lt;BR /&gt;
While we're on the subject, can I use filtering to retrieve any TEXT or MTEXT objects in the drawing? I am assuming I can since they aren't dynamic blocks.</description>
      <pubDate>Mon, 23 Mar 2009 03:09:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452280#M71327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T03:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help using SelectionFilter</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452281#M71328</link>
      <description>Yes, you can by using the entity type's name with the&lt;BR /&gt;
DXF 0 filter item. You can also include multiple types&lt;BR /&gt;
seperated by commas:&lt;BR /&gt;
&lt;BR /&gt;
      new TypedValue( 0, "TEXT,MTEXT" )&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;MERIDIUS2000&gt; wrote in message news:6146690@discussion.autodesk.com...&lt;BR /&gt;
Thanks again for the reply. I already have a solution in place that iterates &lt;BR /&gt;
through all the objects found in a "SelectAll" operation and finds the &lt;BR /&gt;
blocks I am looking for. I was hoping that filtering would provide a better &lt;BR /&gt;
solution that going through all the entities in the drawing, but I guess &lt;BR /&gt;
that's not the case. While we're on the subject, can I use filtering to &lt;BR /&gt;
retrieve any TEXT or MTEXT objects in the drawing? I am assuming I can since &lt;BR /&gt;
they aren't dynamic blocks.&lt;/MERIDIUS2000&gt;</description>
      <pubDate>Mon, 23 Mar 2009 05:10:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-using-selectionfilter/m-p/2452281#M71328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T05:10:18Z</dc:date>
    </item>
  </channel>
</rss>

