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

getentity w/ window & crossing

1 REPLY 1
Reply
Message 1 of 2
Anonymous
172 Views, 1 Reply

getentity w/ window & crossing

Is there a routine out there that allows selection of multiple entities
similar to GetEntity but allows for window, crossing, fence, Wpolygon,
Cpolygon, etc. ideally it would work like the regular autocad selection
where in if the user selects an object that is what is returned or else a
left crossing of right window box is made or the user can enter w,c,f,wp,cp,
etc
to select. The routing would return a collection of AcadObjects.

Thanks in advance!!!!
--
Phil Custer II, PE
Custer Services, Inc.
custer@landfillgas.com
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

For this you use the SelectOnScreen method on the AcadSelectionSet object.
Quick example:

Private Sub CommandButton1_Click()
Dim ss As AcadSelectionSet

Me.Hide

On Error Resume Next
Set ss = ThisDrawing.SelectionSets.Item("SEL")
If ss Is Nothing Then
Set ss = ThisDrawing.SelectionSets.Add("SEL")
Else
ss.Clear
End If

ss.SelectOnScreen

MsgBox "Number of objects selected: " & Trim(Str(ss.Count))

End Sub

I hope this helps.

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

--
"Phil Custer" wrote in message
news:CE3B58BF7A65F0345BC001C4CD2FFC66@in.WebX.maYIadrTaRb...
> Is there a routine out there that allows selection of multiple entities
> similar to GetEntity but allows for window, crossing, fence, Wpolygon,
> Cpolygon, etc. ideally it would work like the regular autocad selection
> where in if the user selects an object that is what is returned or else a
> left crossing of right window box is made or the user can enter
w,c,f,wp,cp,
> etc
> to select. The routing would return a collection of AcadObjects.
>
> Thanks in advance!!!!
> --
> Phil Custer II, PE
> Custer Services, Inc.
> custer@landfillgas.com
>
>

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

Post to forums  

Autodesk Design & Make Report

”Boost