Message 1 of 6
Help using SelectionFilter
Not applicable
03-22-2009
04:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all;
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.
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.
...
TypedValue[] value = { new TypedValue(2, "PANEL") };
SelectionFilter filter = new SelectionFilter(value);
PromptSelectionResult selectAll = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.SelectAll(filter);
...
Here is a listing of one of the blocks in my drawing, for reference:
"BLOCK REFERENCE Layer: "GR-SK-AR"
Space: Model space
Handle = d34
Block Name: "PANEL"
Anonymous Name: "*U10"
at point, X= 469.0271 Y=1062.0000 Z= 0.0000"
Any help or guidance would be greatly appreciated.
Thanks!
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.
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.
...
TypedValue[] value = { new TypedValue(2, "PANEL") };
SelectionFilter filter = new SelectionFilter(value);
PromptSelectionResult selectAll = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.SelectAll(filter);
...
Here is a listing of one of the blocks in my drawing, for reference:
"BLOCK REFERENCE Layer: "GR-SK-AR"
Space: Model space
Handle = d34
Block Name: "PANEL"
Anonymous Name: "*U10"
at point, X= 469.0271 Y=1062.0000 Z= 0.0000"
Any help or guidance would be greatly appreciated.
Thanks!