Visual Basic Customization

Visual Basic Customization

Reply
Active Member
wcrichton
Posts: 6
Registered: ‎02-09-2006
Message 1 of 4 (171 Views)

acSelectionSetAll and only objects in model space

171 Views, 3 Replies
06-08-2006 01:10 PM
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
*Bernard Flavignard
Message 2 of 4 (171 Views)

Re: acSelectionSetAll and only objects in model space

06-08-2006 01:18 PM 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
*Paul Richardson
Message 3 of 4 (171 Views)

Re: acSelectionSetAll and only objects in model space

06-08-2006 01:38 PM 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
*Paul Richardson
Message 4 of 4 (171 Views)

Re: acSelectionSetAll and only objects in model space

06-08-2006 01:40 PM 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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.