Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: What determines the order of Objects added to a selection set via SSGET

  1. #11
    100 Club
    Join Date
    2007-02
    Posts
    148
    Login to Give a bone
    0

    Default Re: What determines the order of Objects added to a selection set via SSGET

    i know this thread is pretty old but can someone tell me if it is possible and how to rearrange the entities in a selection set. what i am currently doing is that my program will preselect items on a drawing and later ask the user to select unselected but needed items to add onto the selection set for processing. i tried by reading the coordinates of the items into a list and perform sorting using vl-sort but was not able to obtain the order i needed.

    a little background info, the "to-be-selected" items are lwpolylines placed in a "square-like" fashion. in the diagram, the purple areas are preselected and the user must self-select the others(the 3-line-made-polyline).

    the current ordering seems random, it can start in the middle item and run one round on each of the 4 sides before proceeding to the next side, i want the order to run through all the items in a counter-clockwise manner.

    thanks in advance for any to-come-help.
    Attached Images Attached Images
    Last edited by tany0070; 2007-05-04 at 09:21 AM.

  2. #12
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: What determines the order of Objects added to a selection set via SSGET

    Looking at your example, you could use the angle of the pline segment closest to the POINT in the center.
    By getting the angle in a list with the object you could sort on the angle, then move the items
    with less than the desired START angle to the end of the list.

  3. #13
    100 Club
    Join Date
    2007-02
    Posts
    148
    Login to Give a bone
    0

    Default Re: What determines the order of Objects added to a selection set via SSGET

    Quote Originally Posted by CAB2k
    Looking at your example, you could use the angle of the pline segment closest to the POINT in the center.
    By getting the angle in a list with the object you could sort on the angle, then move the items
    with less than the desired START angle to the end of the list.
    thanks for the suggestion, will try to work this out on coding, oh may i also throw in this question, is it possible to "write" this sorted data onto the drawing so that i do not need to resort it again the next time i ssget the polylines. thanks

  4. #14
    100 Club
    Join Date
    2007-02
    Posts
    148
    Login to Give a bone
    0

    Default Re: What determines the order of Objects added to a selection set via SSGET

    Quote Originally Posted by CAB2k
    Looking at your example, you could use the angle of the pline segment closest to the POINT in the center.
    By getting the angle in a list with the object you could sort on the angle, then move the items
    with less than the desired START angle to the end of the list.
    sorry for double posting can i ask for a suggestion on how to do the sorting, i have done the angle calculation and tried sorting with VL-SORT but it doesn't really help much. thanks

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 4
    Last Post: 2015-01-29, 04:46 PM
  2. Inverting an SSGET selection set
    By jpcadconsulting347236 in forum AutoLISP
    Replies: 3
    Last Post: 2014-03-25, 04:05 PM
  3. Get implied selection withuot using ssget. .
    By M. Kubitza in forum AutoLISP
    Replies: 11
    Last Post: 2009-12-28, 08:56 PM
  4. Replies: 6
    Last Post: 2007-03-21, 10:58 PM
  5. Replies: 1
    Last Post: 2007-03-08, 01:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •