How to get the handle of all the selected objects?

How to get the handle of all the selected objects?

Anonymous
Not applicable
337 Views
3 Replies
Message 1 of 4

How to get the handle of all the selected objects?

Anonymous
Not applicable
I have a requirement where I want to get the handle of all selected objects (in the drawing) in a function. (The selection is done manually.)

It would be really helpful for me if somebody can suggest some methods.

Thanking you in anticipation
Sumod
0 Likes
338 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Here's one way (assuming the selection set is referenced by the variable
ss):

Dim hndArray(0 To ss.Count - 1) As String

For i = 0 To ss.Count -1
hndArray(i) = ss.Item(i).Handle
Next

--
Visit me at http://www2.stonemedia.com/franko

"sumod" wrote in message
news:ef07627.-1@WebX.SaUCah8kaAW...
> I have a requirement where I want to get the handle of all selected
objects (in the drawing) in a function. (The selection is done manually.)
>
> It would be really helpful for me if somebody can suggest some methods.
>
> Thanking you in anticipation
> Sumod
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thank you Frank for your prompt reply. But the problem is that there are no elements in the selection set collection object. I got the selection set object by ThisDrawing.selectionSets and this collection does not contain any object handles. Do you have any other suggestions to get the handles of all objects which are selected manually.

Thanking you in anticipation.
Sumod
0 Likes
Message 4 of 4

Anonymous
Not applicable
I assumed you meant the user selected objects after you created the
selection set. Is that not the case? If you're trying to get the handles for
items that are gripped, you can access them with
ThisDrawing.ActiveSelectionSet

--
Visit AcadXtreme for a chance to win a copy of AutoCAD LT 2000
Contest ends 5/26/00
http://www.acadx.com

"sumod" wrote in message
news:ef07627.1@WebX.SaUCah8kaAW...
> Thank you Frank for your prompt reply. But the problem is that there are
no elements in the selection set collection object. I got the selection set
object by ThisDrawing.selectionSets and this collection does not contain any
object handles. Do you have any other suggestions to get the handles of all
objects which are selected manually.
>
> Thanking you in anticipation.
> Sumod
0 Likes