
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody. First message on the forums but been reading you for ages :).
I'm struggling to understand what the AcadSelectionSet.Select method is actually for. I thought it would eventually allow me to highlight objects the same way the Quick Select tool does and then modify them to suit my needs. That doesn't seem to be the case and I'm wondering what I'm doing wrong here.
My goal is to select determined (dynamic) blocks in a specific layer to subsequently explode them by means of the Burst command in order to not mess the blocks up. To get familiar with the AcadSelectionSet object and its methods, I started playing around with just the selection of circles in my drawing, first, and then layers. I initially used the AcadSelectionSet.SelectOnScreen method and it went relatively well except that it's not like the Quick Select tool and I don't see the use. On top of that, it was not picking up the blocks. No matter how many times I've tried. I've tried removing blanks in the blocks names, shortening, redefining them... Without success. Which has driven me nuts. Hint: By using the oldschool Filters, they would not pick up some of my blocks either (?!).
Anyways, given that my goal is to do everything from the code without having the user to interact with the space model at this stage, I opted for AcadSelectionSet.Select thinking it was magically going to fix the problems I've just mentioned with the blocks. And that's when things got even worse: running the code had no effect at all, it was as if nothing had been selected. Now, I couldn't even select the circles nor the objects in the layers. Next, you can see my code for the circles that doesn't work at all:
Sub FiltrarCírculos()
Dim MiFiltro As AcadSelectionSet
Dim TipodeFiltro(0) As Integer
Dim DatodeFiltro(0) As Variant
Dim i As Integer
Set MiFiltro = ThisDrawing.SelectionSets.Add("MisBloques")
TipodeFiltro(0) = 0
DatodeFiltro(0) = "Circle"
MiFiltro.Select acSelectionSetAll, , , TipodeFiltro, DatodeFiltro
' MiFiltro.SelectOnScreen TipodeFiltro, DatodeFiltro
' MiFiltro.Delete
End Sub
I've commented out the last two lines because, on the one hand, I've been trying switching between the Select and the SelectOnScreen methods to see if that could do the trick, on the other hand, I thought that deleting the SelectionSet could cancel it and thus no actual selection would be visible. Again, it didn't work.
Sorry for the long explanation, I wanted to be as much thorough as possible. Could you please shed light on what's wrong with the Select method and what is the AcadSelectionSet for?
Thank you.
Solved! Go to Solution.