Visual Basic Customization

Visual Basic Customization

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

acSelectionSetAll and only objects in model space

174 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 (174 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 (174 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 (174 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.