Get All previosly selected objects

Get All previosly selected objects

Anonymous
Not applicable
1,062 Views
4 Replies
Message 1 of 5

Get All previosly selected objects

Anonymous
Not applicable

Hello!

 

I am trying to get all selected objects in autocad window.

 

Is there some way to get this.

 

I want to have this as separate function, without <commandmethod("xxx")> _,

something like.

 

Public Function GetSelectedObjects () as ObjectIdCollection

 

'Pseudocode

return Autocad.GetSelectedObjects.ToObjIds

 

end function

 

Best regards,

Danijel

0 Likes
Accepted solutions (1)
1,063 Views
4 Replies
Replies (4)
Message 2 of 5

kerry_w_brown
Advisor
Advisor
Accepted solution

 

Have a look at :-

Using the pickfirst selection from an AutoCAD .NET application

http://through-the-interface.typepad.com/through_the_interface/2006/09/using_the_pickf.html

 

Adding to the AutoCAD pickfirst set with .NET

http://through-the-interface.typepad.com/through_the_interface/2007/01/adding_to_the_a.html


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes
Message 3 of 5

kerry_w_brown
Advisor
Advisor

 

 

Be sure to read Alberts Comments in that first link

ie :

>> The code above could be simplified by using Editor.GetSelection(). <<


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes
Message 4 of 5

kerry_w_brown
Advisor
Advisor

 

 

... and just for fun I searched my NNTP archive

for posts containing 'GetSelection' by  Tony T

There are a few hits there

.... AND I did it on my laptop without an internet connection .... but we won't go there  🙂

 


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes
Message 5 of 5

Anonymous
Not applicable

Thank you a lot KerryBrown

 

I will try this, seems it will help me :-)!

 

Best regards

Danijel

0 Likes