Selection set from a previous selection set

Selection set from a previous selection set

Anonymous
Not applicable
241 Views
1 Reply
Message 1 of 2

Selection set from a previous selection set

Anonymous
Not applicable
I make a selection set named SelObj.
After i want to make a parzial selection set named SelParz
from my previous SelObj using the filter metod.

My wrong code:

'Make SelObj and SelParz
Set SelObj = ThisDrawing.SelectionSets.Add("TasselliLet")
Set SelParz = ThisDrawing.SelectionSets.Add("SelezioneParz")

'Select the total entity
SelObj.SelectOnScreen

'Dim and make the filter
Dim TipoFiltro(0) As Integer
Dim DatiFiltro(0) As Variant

TipoFiltro(0) = 8
DatiFiltro(0) = "Dxf1"

'My parzial selection set
SelParz.Select acSelectionSetPrevious, , , TipoFiltro, DatiFiltro

I dont want to refer previous selection but i want to refer any time at the SelObj selection set?Why?
Thx to all!
0 Likes
242 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
The first solution is to use the filter with the
SelectOnScreen method directly (I'm not sure what you trying to say with tha
last sentence, so this might not be an option).

 

The other option is to loop the entities in the
selectionset and see if they match your requirements. If this is as the code
below, it could be something like this:

 

Dim oEnt As AcadEntity

For Each oEnt In
SelObj

    If oEnt.Layer = "Dxf1"
Then

        ' Add it to
the other selectionset

        ' Or do
whatever you want to do to these objects directly

    End If

Next


--
Rune Wold
Take the dog for a walk to reply

 

--


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
make a selection set named SelObj.
After i want to make a parzial
selection set named SelParz
from my previous SelObj using the filter
metod.

My wrong code:

'Make SelObj and SelParz
Set SelObj =
ThisDrawing.SelectionSets.Add("TasselliLet")
Set SelParz =
ThisDrawing.SelectionSets.Add("SelezioneParz")

'Select the total entity
SelObj.SelectOnScreen

'Dim and make the filter
Dim TipoFiltro(0) As Integer
Dim
DatiFiltro(0) As Variant

TipoFiltro(0) = 8
DatiFiltro(0) = "Dxf1"

'My parzial selection set
SelParz.Select acSelectionSetPrevious, , ,
TipoFiltro, DatiFiltro

I dont want to refer previous selection but i want to refer any time at the
SelObj selection set?Why?
Thx to all!

0 Likes