View Full Version : What determines the order of Objects added to a selection set via SSGET
tany0070
2007-03-22, 05:46 AM
hi pple, just want to ask if anyone can explain to me how the selection set from SSGET is orientated? like if there are 10 rectangles on a drawing spaced equally one next to another, which one will be read into the selection set first followed by which?? thanks
Adesu
2007-03-22, 08:14 AM
Hi tany,
I'm not yet undestand what are you ask about orientated,can you upload your sample drawing.
hi pple, just want to ask if anyone can explain to me how the selection set from SSGET is orientated? like if there are 10 rectangles on a drawing spaced equally one next to another, which one will be read into the selection set first followed by which?? thanks
tany0070
2007-03-22, 10:00 AM
sorry i don really have a sample drawing for this, what i am asking is if there is any order (first, second etc) to which the selected items are added to the selection set, or are they just randomly added into the selection set. thank again
Mr Cory
2007-03-22, 12:57 PM
I think there must be as when you select polylines to join they take on the properties of the first one you select, so one can only assume this is the same for ssget. Sorry i can tbe more help
Avatart
2007-03-22, 03:35 PM
I think that they are in the order in which they appear in the drawing database, so generally, they will be in the chronological order in which you drew them. Though I would think that this is not a good assumption to make if you are doing something programmatically to the database.
tany0070
2007-03-23, 02:33 AM
i see thanks
tany0070
2007-03-23, 08:27 AM
oh and may i know how to view the drawing database? thanks
Avatart
2007-03-23, 11:22 AM
oh and may i know how to view the drawing database? thanksDXFOUT and open the resulting .DXF file in WordPad or some other text editor. You will need a list of what all the DXF codes mean, you can get that from the Help system in the VLIDE.
kennet.sjoberg
2007-03-23, 05:19 PM
If you pick select objects they are added to the SelectionSet in that order.
If you window select or "_X" select or similar they are added to the SelectionSet from the last created object to the very first.
You will find the HEX order number in the objects Handle,
convert it to DEC and you have the flow. . . .
: ) Happy Computing !
kennet
tany0070
2007-03-26, 03:53 AM
thank you very much
tany0070
2007-05-04, 11:15 AM
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.
CAB2k
2007-05-04, 02:30 PM
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.
tany0070
2007-05-07, 02:54 AM
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
tany0070
2007-05-07, 04:57 AM
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
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.