VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

acSelectionSetAll and only objects in model space

3 REPLIES 3
Reply
Message 1 of 4
wcrichton
433 Views, 3 Replies

acSelectionSetAll and only objects in model space

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
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: wcrichton

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
Message 3 of 4
Anonymous
in reply to: wcrichton




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
Message 4 of 4
Anonymous
in reply to: wcrichton


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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost