Selector.MultipleSelect(dRect, True, False) returns empty collection

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
StefanChrist
Posts: 22
Joined: 06 Jul 2018, 10:52

Selector.MultipleSelect(dRect, True, False) returns empty collection

Post by StefanChrist » 05 Nov 2018, 13:37

Hello support,

after upgrading from v11 to v12 we are facing another issue using Selector.MultipleSelect. In v12 the Selector class always returns an empy collection. Could you please investigate if the class is working as expected.

Thank you.

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Selector.MultipleSelect(dRect, True, False) returns empty collection

Post by support » 06 Nov 2018, 20:31

Hello Stefan,

In v12 the CADSelector.MultipleSelect() method behaviour depends on a CADSelector.UseShiftToAddSelected property value which determines one of the available selection modes:

CADSelector.UseShiftToAddSelected = False (by default) - allows each selected object (group of objects) to be added to the current selection set without discarding previous selections. You have to hold the Shift key pressed and use the left mouse button to discard the previous selections.

CADSelector.UseShiftToAddSelected = True - when trying to select more objects in a drawing after selecting one or more items, the previously selected objects become unselected. You have to hold the Shift key pressed and use the left mouse button to be able to add new objects to the selection set.

The above mentioned selection modes work in the same way as Use Shift to add to selection option in AutoCAD:

Image

The second parameter of the CADSelector.MultipleSelect() method actually takes the Shift key state (pressed and held or not pressed). When CADSelector.UseShiftToAddSelected = False and this parameter is set to True (that emulates the case when the Shift key is pressed and held), you are only able to discard previous selections. This is the expected behaviour.

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support


Post Reply