acSelectionSetAll and only objects in model space

acSelectionSetAll and only objects in model space

Anonymous
Not applicable
561 Views
3 Replies
Message 1 of 4

acSelectionSetAll and only objects in model space

Anonymous
Not applicable
I am trying to populate a selection set using acSelectionSetAll and a filter list. It works great but returns objects in both model and paper space. I cannot find a way to limit the return to only model. I cannot find a way to step through the returned objects and examine if they belong to model or paper...

Any thoughts or suggestions?

Thanks,
Will
0 Likes
562 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Hello,
Like this, it is wtih gpCode = 67

On Error Resume Next
Set selection_3d_poly = ThisDrawing.SelectionSets.Item("ATESTER")
If Err Then
Err.Clear
Else
selection_3d_poly.Delete
End If
Set selection_3d_poly = ThisDrawing.SelectionSets.Add("ATESTER")
ReDim gpCode(2)
ReDim dataValue(2) As Variant
gpCode(0) = 0
dataValue(0) = "POLYLINE"
gpCode(1) = 8
dataValue(1) = liste_calques_pente_canalisation
'Seulement en Espace Objet
gpCode(2) = 67
dataValue(2) = 0
groupCode = gpCode
dataCode = dataValue
selection_3d_poly.Clear
'Sélection de toutes les 3DPOLY , appartenant aux calques choisis du dessin et
en Espace Objet
selection_3d_poly.Select acSelectionSetAll, , , groupCode, dataCode

--
Bernard Flavignard
France

a écrit dans le message de news: 5200429@discussion.autodesk.com...
I am trying to populate a selection set using acSelectionSetAll and a filter
list. It works great but returns objects in both model and paper space. I cannot
find a way to limit the return to only model. I cannot find a way to step
through the returned objects and examine if they belong to model or paper...

Any thoughts or suggestions?

Thanks,
Will
0 Likes
Message 3 of 4

Anonymous
Not applicable



Dim entsBlock as AcadBlock
For Each ent in urSelectionSet
Set entsBlock = ThisDrawing.ObjectIdToObject(ent.OwnerID)
Debug.Print ent.Name
Next ent

wrote in message news:5200429@discussion.autodesk.com...
I am trying to populate a selection set using acSelectionSetAll and a filter
list. It works great but returns objects in both model and paper space. I
cannot find a way to limit the return to only model. I cannot find a way to
step through the returned objects and examine if they belong to model or
paper...

Any thoughts or suggestions?

Thanks,
Will
0 Likes
Message 4 of 4

Anonymous
Not applicable

oops... should be
Debug.Print entsBlock.Name

"Paul Richardson" wrote in message
news:5200471@discussion.autodesk.com...



Dim entsBlock as AcadBlock
For Each ent in urSelectionSet
Set entsBlock = ThisDrawing.ObjectIdToObject(ent.OwnerID)

Next ent

wrote in message news:5200429@discussion.autodesk.com...
I am trying to populate a selection set using acSelectionSetAll and a filter
list. It works great but returns objects in both model and paper space. I
cannot find a way to limit the return to only model. I cannot find a way to
step through the returned objects and examine if they belong to model or
paper...

Any thoughts or suggestions?

Thanks,
Will
0 Likes