prevent user from rectangle selection

prevent user from rectangle selection

essam-salah
Collaborator Collaborator
617 Views
5 Replies
Message 1 of 6

prevent user from rectangle selection

essam-salah
Collaborator
Collaborator

hi

im writing a c# plugins and prompt the user to select some polylines, the problem happens when the user select with rectangle selection (because it makes non ordered seclection), but selection one by one or using fence selection it keeps the selected objects ordered. 

the question is : i want to know if  there is way to prevent the user from making not ordered selection.

any help will be appreciated.

0 Likes
Accepted solutions (1)
618 Views
5 Replies
Replies (5)
Message 2 of 6

kerry_w_brown
Advisor
Advisor

 

Have you tried to use GetEntity() in a loop.

 

Regards,


// 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
Message 3 of 6

essam-salah
Collaborator
Collaborator

Hi @kerry_w_brown ;

thanks for your respond, it seems good but i want to allow fence selection too. if there is a way to let the user use fence selection only it'll be great too.

0 Likes
Message 4 of 6

kerry_w_brown
Advisor
Advisor

@essam-salah wrote:

Hi @kerry_w_brown ;

thanks for your respond, it seems good but i want to allow fence selection too. if there is a way to let the user use fence selection only it'll be great too.


 

The difficulty is that any box/fence selection just gives you a bucket full of objects stacked in an order that you have no control over.

 

 


// 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 6

essam-salah
Collaborator
Collaborator

But fence selection always gives me an ordered selection. 

0 Likes
Message 6 of 6

kerry_w_brown
Advisor
Advisor
Accepted solution

@essam-salah wrote:

Hi @kerry_w_brown ;

thanks for your respond, it seems good but i want to allow fence selection too. if there is a way to let the user use fence selection only it'll be great too.


 

I found some time to play:

http://www.theswamp.org/index.php?topic=55306.0

 

SSGetFilterByFence() ...

may help you.

There may be a way to be able to combine single selection and Fence selection ; using a keyword event trap to switch between modes. It would probably get a little messy handling the changes between modes because the selection set would need to be built then added to for single picks then etc, etc, but I think it would work.

 

Regards,

 

 


// 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