TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: amc.dicsac on March 20, 2017, 01:36:48 PM

Title: SelectionSet order (2)
Post by: amc.dicsac on March 20, 2017, 01:36:48 PM
Hi.

I am trying to find a lisp that allows to maintain the order of a selection set, someone could help me with that information. :sleezy:

Thank you

Title: Re: SelectionSet order (2)
Post by: Lee Mac on March 20, 2017, 01:39:39 PM
Since a set of objects may be selected to populate a selection set using any standard selection method (e.g. Window/Crossing/Window Polygon/Crossing Polygon/Fence/Group/Pick etc.), what 'order' are you referring to?
Title: Re: SelectionSet order (2)
Post by: amc.dicsac on March 20, 2017, 01:46:55 PM
Since a set of objects may be selected to populate a selection set using any standard selection method (e.g. Window/Crossing/Window Polygon/Crossing Polygon/Fence/Group/Pick etc.), what 'order' are you referring to?

When a selection is made, the average of each object's Handle is something similar to what "Jeff_M" posts

https://www.theswamp.org/index.php?topic=43477.msg487173#msg487173 (https://www.theswamp.org/index.php?topic=43477.msg487173#msg487173)
Title: Re: SelectionSet order (2)
Post by: CAB on March 20, 2017, 04:13:42 PM
Since a set of objects may be selected to populate a selection set using any standard selection method (e.g. Window/Crossing/Window Polygon/Crossing Polygon/Fence/Group/Pick etc.), what 'order' are you referring to?
If you pick one at a time the order should remain as picked. Other methods of selection are somewhat unpredictable.
That is they are added to the set from upper right  or upper left if memory serves me.
Title: Re: SelectionSet order (2)
Post by: Lee Mac on March 20, 2017, 06:34:35 PM
Personally, I would not rely on the order of entities appearing in a selection set obtained through a graphical selection method - I would only ever use the order of entities in a set obtained using the "X" mode string, which is known to be dependent on the sequence of objects in the drawing database.

If the selection is obtained from the user picking multiple objects, I would instead suggest using entsel within a while loop; other methods of selection (such as window/crossing) do not imply a selection order in my opinion.
Title: Re: SelectionSet order (2)
Post by: amc.dicsac on March 20, 2017, 06:35:01 PM
Since a set of objects may be selected to populate a selection set using any standard selection method (e.g. Window/Crossing/Window Polygon/Crossing Polygon/Fence/Group/Pick etc.), what 'order' are you referring to?
If you pick one at a time the order should remain as picked. Other methods of selection are somewhat unpredictable.
That is they are added to the set from upper right  or upper left if memory serves me.

Of course if I select one by one the order is maintained.

The problem is when it is selected in a massive way, it automatically creates a list by ordering the objects according to the Handle of each one.

I try to find some way to avoid ordering it that way,I think about of making a loop and store the selection with the "SSADD" function, some other idea would appreciate the support 
Title: Re: SelectionSet order (2)
Post by: roy_043 on March 21, 2017, 04:31:49 AM
... a list by ordering the objects according to the Handle of each one...
The draworder also can have an impact on the order of elements in a selection set.
Title: Re: SelectionSet order (2)
Post by: roy_043 on March 21, 2017, 06:20:20 AM
The ssnamex function can be used to analyse how a selection set was created.