Author Topic: Clearing "previous" selection sets  (Read 7352 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Clearing "previous" selection sets
« on: October 30, 2009, 03:18:49 PM »
I have been looking into how to clear out a previous selection set, and either I am missing an elementary method or it isn't possible ... It seems as though it should be, but alas I can't find it ... you know, its the  trees / forest thingy ... anyway, I have tried iterating through the selection sets and deleting them and I have tried creating a blank selection set, but the way AutoCAD handles the "previous" selection set is obviously a secret beyond my current comprehension.

Is this even possible to do?

The need I have is simple ...
Code: [Select]
(setq sset (ssget "_P" <insert selection filter here> ))
(if sset
  (if (/= (sslength sset) 0)
;;; do stuff here if there is a selection set and if it has passed the filter criteria and there is at least one item
  )
)
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Clearing "previous" selection sets
« Reply #1 on: October 30, 2009, 03:41:24 PM »
Wouldn't

(setq sset nil)

do what you need?  Maybe I am missing the question?
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #2 on: October 30, 2009, 03:42:31 PM »
Use (ssgetfirst) ILO (ssget "_P"), need to adjust syntax.  8-)
Because the selection set is already made you will need to post filter it.
Or did I miss the question.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #3 on: October 30, 2009, 03:49:14 PM »
OK, if you use ssget to create a selection set the function (ssget "_P") will return that set but the filter option does not work with "_P".
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #4 on: October 30, 2009, 04:03:28 PM »
This is a multi-faceted problem that I am trying to code around. Some time ago I needed the ability to allow the user to either select a window of objects or enter arbitrary information at the command line ...

Quote
Command: Select Objects [All/Blocks/Lines]:

since ssget does not allow for arbitrary input, I have to prompt the user and rely instead upon a home-grown solution to allow for the input. This means that the user will likely select a point occasionally. This is fine, except I cannot pass a starting point in a ssget call ...

I could however, grab both points with:

Code: [Select]
(initget "Some Arbitrary Values")
(setq pt1 (getpoint))
(if (= (type pt1) 'LIST)
  (setq pt2 (getcorner pt1))
  <do other stuff here>
)

and pass those points to ssget, but that will allow only a single try at selecting the objects. But I need to allow the user to select until they don't wish to select any longer ... so I use:

Code: [Select]
(vl-cmdf "select")
  (while (> (logand (getvar"CMDACTIVE") 1) 0)
  (vl-cmdf pause)
)

This allows a "previous" selection set to be created at which point I can filter it using

Code: [Select]
(setq sset (ssget "_P" <insert selection filter here> ))
(if sset
  (if (/= (sslength sset) 0)
;;; do stuff here if there is a selection set and if it has passed the filter criteria and there is at least one item
  )
)

Now, I should have a selection set based on the previous selections from my "select" call.

This works great, except occasionally, the user may not select anything, in that case, we can't peek into the "select" mechanism to see if something was selected, we can only select the previous selection set ... however, if you have not erased anything using the "erase" command, the previous selection set remains active forever, or until you close the drawing. This is a data manipulation function so I don't want any previous selection .. I want either the expressly selected elements or nothing, but I cannot seem to get away from the ssget "_P" call.

Does that make it more clear?
« Last Edit: October 30, 2009, 04:10:26 PM by Keith™ »
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #5 on: October 30, 2009, 04:06:27 PM »
OK, if you use ssget to create a selection set the function (ssget "_P") will return that set but the filter option does not work with "_P".


actually it does ...

Code: [Select]
(setq sset (ssget "_P" '((-4 . "<or")(2 . "SWITCH")(2 . "RECP")(-4 . "or>"))))
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #6 on: October 30, 2009, 04:29:47 PM »
If you use a ' while ' loop, with a check to the system variable ' errno ', then you can loop until right click is pressed.  Each loop can be a single ' ssget ' call, or whatever, but they user will not know.  Example:
Code: [Select]
(setvar 'ErrNo 0)
(while (not (equal (getvar 'ErrNo) 52))
 (ssget ":s")
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #7 on: October 30, 2009, 04:42:34 PM »
thats cool .. I'll have to see if I can incorporate it, but alas, I would still need to select all objects the user attempted to select, to that end, I suppose I could create an empty selection set then add each subsequent selection set to the previous until errno = 52, but I certainly would not be able to use "_P"

the whole point is to allow the user to generate a selection set or enter arbitrary data ... so I would still have to pass a previous selection set .. unless of course the user missed selecting anything, or they didn't pass the filter .. in which case the previous selection set would be incorrect.

my head hurts ... it is time for the weekend
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #8 on: October 30, 2009, 04:47:11 PM »
Maybe get the previous selection set when the code is ran, so that if at any time ' p ' is pressed, it will add whatever the previous selection set was.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #9 on: October 30, 2009, 05:02:10 PM »
That is the problem, I select the previous selection set .. if the user doesn't select anything, it still returns items from the selection attempt prior to the current selection attempt.

This can be verified by doing the following:

use the select command and select a few objects ...

now use (ssget "_P")

you will get the items selected by "Select"

Now, use select again and simply window in an area where there are no objects
you have selected nothing ... i.e. the last selection set was nothing ..

now use (ssget "_P")

you will get the selection set created by the previous (ssget "_P") call, when you are expecting to have no entities ... this happens regardless of the selection mechanism ... if no objects are selected in the current selection process, when you select "_P" you get items from the previous selection process ...

I know it sounds silly, but the result is annoying as hell
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #10 on: October 30, 2009, 05:24:32 PM »
That sounds like what should happen.  If you select nothing, then there is no selection set, so that should not be the previous one, as you didn't selection anything.  The only previous selection set that should be nil, is when you just open a drawing, and try to select previous.

What I was talking about though, is right when your command is called, get the previous selection set.  Then do the loop for the selection.  If ' p ' is entered, then run through the previous selection set that you grabbed at the beginning of the code.  This will in essence grab the entities from before your command was called; like one would expect.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #11 on: October 30, 2009, 05:29:10 PM »
Problem is that if you select objects & then call the routine the selected objects can only be acquired via ssgetfirst
which is still not the previous selection set.
As you say though you can rule out a previous set by comparing the entities with in both sets. So the forst thing your
routine does is (setq oldss (ssget "_P")).

You could fall back to grread and simulate the ssget.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #12 on: October 30, 2009, 05:54:41 PM »
Can't you use ' (ssget "i") ' to get the select objects when the command is called?  Will return a selection set if something is selected, or nil if nothing is selected.  At least it did in my little test here.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #13 on: October 30, 2009, 06:10:31 PM »
Tim, I am not sure an implied selection set will resolve the issue.

Either I am missing something or I am not explaining the issue correctly.

When the function is called to select objects, there is nothing selected, and there should be nothing selected. i.e. the user should select the items only when prompted to do so. The idea is that the user either enters a keyword OR begins selecting objects on the screen as prompted ..

Select Objects [Some/Arbitrary/Options/Go/Here]:

Since I cannot use option keywords with ssget, I must through necessity abandon the thought of using ssget for the selection mechanism. So, I use grread to track the mouse and filter all input. If a point is selected, the second corner is immediately prompted for ... but I want to be able to select multiple times before continuing the program ..  since I couldn't use ssget for my first selection set, I have to emmulate a selection window. getcorner works well for that purpose ... so now I have 2 points from my first (emmulated) selection ... those points are passed to ssget "_W" or "_C" depending upon the order of the point selection, thus abiding by the default AutoCAD selection process of crossing or window depending upon the direction of the selection window.

Now I have a selection set ... maybe ... since I am filtering for specific items, the user may think they have selected something when in fact they have not ... if the user continues to select, the subsequent selections can be made with either the code I previously posted OR use a modified version of the code Tim provided. If the user does not attempt to select any further items, the selection set will be empty, but through necessity, since the "select" command is issued immediately following the first selection process, there is no way to know if the user selected anything in the second attempt .. thus I am forced to use ssget "_P" after the select command ends.

Now, keep in mind that the first selection set was empty, thus a new "previous" selection set isn't created ... and "select" didn't select anything ... so in reality there are no items selected, but ssget "_P" returns the items selected the last time a selection set was successfully created ... i.e. from whatever task was previously completed.

It appears as though I have use ssget the entire way, passing the points on the fly and grab selection sets each time, iterate through them, and add them back to the original selection set. This isn't really a problem on small drawings, but when you start having selection sets of 1000 items or more that have to be filtered AND added to another selection set, the process becomes painfully slow... another reason why I preferred to use the internal selection mechanism.

I have found a way to make the previous selection set go away ... but it isn't pretty and I don't like doing it ...

1) entmake a graphical entity in the drawing
2) erase it using (vl-cmdf "erase" (entlast) "")

for obvious reasons that could cause objects to disappear in the drawing ... but it does clear the "previous" selection set
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #14 on: October 30, 2009, 06:27:49 PM »
I think we need more information.

Why use the ' select ' command?

What is the final code supposed to do?

Maybe we can go about this a different way.  You can select items, add them to a list, highlight them to mimic a selection set option.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #15 on: October 31, 2009, 01:03:38 AM »
I think we need more information.

I'm sorry .. I am trying to explain the isse as precisely as I can but I am obviously falling short


Why use the ' select ' command?

I'd prefer not, in fact the only reason I was using it at all was to keep from having to iterate through thousands of objects moving them from one selection set to another.


What is the final code supposed to do?

The final code should allow the user to specify an arbitrary return value while prompting to select objects for a selection set

I've put together an example working outline of code to return a selection set using some of the ideas we have talked about here.
Code: [Select]
(defun test ( / ans sset filter)
  (setq filter '((0 . "LINE")))
  (setq ans (ssgetEx "Apples Bananas Oranges" filter))
  (cond
    ((= ans "Apples")(setq sset (ssget "_X" '((0 . "LINE")(8 . "APPLES")))))
    ((= ans "Bananas")(setq sset (ssget "_X" '((0 . "LINE")(8 . "BANANAS")))))
    ((= ans "Oranges")(setq sset (ssget "_X" '((0 . "LINE")(8 . "ORANGES")))))
    ((or (= ans nil)(= (type ans) 'PICKSET))(setq sset (getmore ans filter)))
  )
  sset
)

(defun ssgetEx ( options filter / tmp initstr selOpt opCorner rVal prmpt sset)
 (setq initstr options)
 (while (/= tmp options)
  (setq tmp options)
  (setq options (vl-string-subst "/" " " tmp))
 )
 (setq prmpt (strcat "\nSelect Objects ["options"]: "))
 (initget initstr)
 (setq rVal (getpoint prmpt))
 (if (= (type rVal) 'LIST)
   (progn
     (setq opCorner (getcorner rVal "Select opposite corner: "))
     (if (< (car opCorner)(car rVal))
       (setq selOpt "_C")
       (setq selOpt "_W")
     ) 
     (setq sset (ssget selOpt rVal opCorner filter ))
   ) 
   (setq sset rVal)
 )
 sset
)

(defun getmore ( baseset filter / sset )
 (setq sset (ssget filter))
 (if (and baseset sset)
   (cond
     ((<= (sslength baseset)(sslength sset))(while (> (sslength baseset) 0)
     (setq sset (ssadd (ssname baseset 0) sset))
     (setq baseset (ssdel (ssname baseset 0) baseset))
   ))
     ((> (sslength baseset)(sslength sset))(while (> (sslength sset) 0)
     (setq baseset (ssadd (ssname sset 0) baseset))
     (setq sset (ssdel (ssname sset 0) sset))
   )(setq sset baseset))
   )
 )
 sset
)

Maybe we can go about this a different way.  You can select items, add them to a list, highlight them to mimic a selection set option.

I have not added the highlight option, because it will require a forced regen or at very least a re-iteration through the selection set.

Hopefully you can see what I am trying to accomplish. There will be some pre-built filters. In this example, I used lines that are on layers "Apples" "Bananas" or "Oranges" ... or just lines in particular if the user is selecting them.

As you can see, the original input creates a selection set that must be iterated through to combine it with the additional objects selected.

I originally used "select" as a method to keep from having to do that (i.e. to build a single selection set), plus it had the additional effect of highlighting all the selected objects.

One of the things I can live with, but I don't like is that in newer versions of AutoCAD, the selection window is not drawn with the color background and window highlights as is with ssget.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #16 on: October 31, 2009, 01:06:08 AM »
Thinking grread, here is starting point.
http://www.theswamp.org/index.php?topic=29378.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #17 on: October 31, 2009, 12:52:52 PM »
I took a closer look at Lee's routine & added comments. Looks like it would be easy to add the variable filter option.

One question popped up: If the user selects objects, can he change the filter option?
If so, do you go back & filter the already selected objects? I think yes.
Or do you remove the filter option once an object is selected?

I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #18 on: October 31, 2009, 05:30:31 PM »
I considered making the selection process dynamic so the user could select additional items based on the prescribed filters. In other words, the user can select a group of objects and then select an additional filter ...

i.e.
Quote
Command: (setq MySSet (test))
Select objects [Apples/Bananas/Oranges]: Specify opposite corner: 41 found
Select objects [Apples/Bananas/Oranges]: Specify opposite corner: 12 found
Select objects [Apples/Bananas/Oranges]: A
17 found
Select objects [Apples/Bananas/Oranges]: A
17 found (17 duplicate), 70 total
Select objects [Apples/Bananas/Oranges]:
<Selection set: D3E1>
Command:

Or at least that is the way I would like it to work

I used the grread function in an earlier incarnation, but it required extensive osnap handling as well as additional overhead to handle keyboard entry and/or mouse clicks on toolbars and such.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #19 on: October 31, 2009, 06:48:15 PM »
OK, you are adding to the already acquired selection set.

The osnap is not a factor in ssget.
The menu click equates to a "Right Click" so just filter it out.
The big draw back is there is no detection for [Shift Click] without express tools.
You could use the Minus key as the "Remove from ss"
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #20 on: October 31, 2009, 09:36:40 PM »
OK, you are adding to the already acquired selection set.

That is how I am handling it in the working example above, but considering that the selecting will be done on a large scale (i.e. 4000+ entities) iterating through the selection set will cause considerable speed issues, which isn't experienced when using select and building a selection set using "previous"


The osnap is not a factor in ssget.
Correct, although I have done considerable work on emulating osnaps, there is missing functionality and quite honestly, I have found it simpler to deal with the other issues than deal with the osnaps.


The menu click equates to a "Right Click" so just filter it out.
The big draw back is there is no detection for [Shift Click] without express tools.
You could use the Minus key as the "Remove from ss"

Yeah, but I don't want to have to retrain the user and in the end they will likely be confused.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #21 on: November 01, 2009, 09:15:26 AM »
With you code you still can not remove items from the selection set.
The problem is detecting the shift click.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Clearing "previous" selection sets
« Reply #22 on: November 01, 2009, 09:30:00 AM »
You could just use the old R for remove, then if Express Tools is available, give the Shift-Remove option.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #23 on: November 01, 2009, 06:09:11 PM »
I took a run at it.
Code: [Select]
(defun ssget+ (msg data / options filters filter opCorner p1 msg sset ssRet
               ELST ENT ET I INITSTR SELOPT SHIFTWASDOWN )
  (defun FilterTest (ent filter / elst)
    (cond
      ((null filter) t)
      ((setq elst (entget ent))
       (vl-every
         (function
           (lambda (x / tag)
             (and
               (setq tag (assoc (car x) elst))
               (wcmatch (cdr tag) (cdr x)))))
         filter
       )))
  )

  (and (not acet-sys-shift-down)
       (findfile "acetutil.arx")
       (arxload (findfile "acetutil.arx") "Failed to Load Express Tools")
  )
  (setq et (not (vl-catch-all-error-p (vl-catch-all-apply 'acet-sys-shift-down '()))))
  (setq ssRet (ssadd))
  (setq options (mapcar 'car data))
  (setq initstr "")
  (mapcar '(lambda (x) (setq initstr (strcat initstr x " "))) options)
  ;(setq initstr (vl-string-right-trim " " initstr))
  (setq filters (mapcar 'cadr data))
  (setq filter (car filters)) ; start with the first filter
  (sssetfirst)                ; clear any selected objects
  (princ msg)
  (while
    (progn
      (sssetfirst  ssRet ssRet)
      (setvar "errno" 0)      ; must pre set the errno to 0
      (initget 128 initstr)
      (setq ent (entsel ""))
      (setq ShiftWasDown (and et (acet-sys-shift-down)))
      (cond
        ((= (getvar "errno") 52) ; exit if user pressed ENTER
         nil)
        
        ((null ent)           ; picked a point
         (setq data (grread t 8 0))
         (setq p1 (cadr data))
         (vl-catch-all-apply '(lambda()  ; ESC only cancels the getcorner
         (if (setq opCorner (getcorner p1 "\nSelect opposite corner: "))
           (progn
             (if (< (car opCorner) (car p1))
               (setq selOpt "_C")
               (setq selOpt "_W")
             )
             (cond
               ((setq sset (ssget selOpt p1 opCorner filter))
                (setq i -1)
                (while (setq ent (ssname sset (setq i (1+ i))))
                  (if ShiftWasDown
                    (ssdel ent ssRet)
                    (ssadd ent ssRet)
                  )
                )
               )
             )
             (setq sset nil)
           )
         )))
         (princ msg)          ; stay in loop
        )

        ((listp ent)          ; something selected
         (if (FilterTest (car ent) filter)
           (if ShiftWasDown
             (ssdel (car ent) ssRet)
             (ssadd (car ent) ssRet)
           )
         )
         t
        )

        ((vl-position ent options)
         (setq filter (nth (vl-position ent options) filters))
         (princ "\nFilter changed to ")
         (princ filter)
         (princ msg)
        )
        (t)
      )
    )
  )
  ssRet
)


Code: [Select]
(defun c:test (/ input)
  (setq input
         (ssget+
           "\nSelect Objects [All/Blocks/Lines]: " ; prompt string
           ;;  optional filter '((<keyword> <filter>) (<keyword> <filter>) ...)
           (list
             (list "All" '((8 . "0")))
             (list "Blocks" '((0 . "INSERT") (8 . "0")))
             (list "Lines" '((0 . "LINE") (8 . "0")))
           )
         )
  )
  (sssetfirst nil input)      ; highlite objects
  (princ "\nNumber of objects selected: ")
  (princ (if input (sslength input)  "0"))
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #24 on: November 01, 2009, 06:13:00 PM »
Just realized that if you change the filter you can not unselect items that do not match the filter.
Not sure if that is a bug or a feature.  :kewl:
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #25 on: November 04, 2009, 01:12:58 PM »
Did you get something to work for you yet?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #26 on: November 09, 2009, 10:38:51 AM »
Sorry about the absense, I have come down with some kind of infection in my leg and I have been laid up for over a week.

Yes, I did manage a solution that used parts of the various solutions offered here, but I broke down the selection process into several different loops each verifying the previous selection with the current. The process became pretty convoluted and required I use different parts in several other functions, so it isn't as simple as adding a function to call .. but it works and is marginally bulletproof.

I'd still like to see a robust way to manage it from a single function or group of cascading functions that can be called once and allow the user to manage a selection set with filters.

Anyway, I am back at work today, the leg is still in pain, it is still swollen, none of the 8 medications seem to have had much of an effect ... and while it is improving, it is doing so very slowly ... alas, no more sick days = I must be at work ... and I can't take the pain medication the doctors gave me because it makes me dizzy ... so no driving if I take it ..

Thanks for the help guys, I learned a bit by examining avenues that I hadn't yet considered.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #27 on: November 09, 2009, 11:10:21 AM »
Good to hear about the code, sad to hear about the leg.  Hope it heals soon.  If I have some time, I'll see what I can come up with to do what you want.  I might have some time this week.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Clearing "previous" selection sets
« Reply #28 on: November 09, 2009, 11:27:14 AM »
Glad you are up & around Keith. Don't be too caviler with that infection. Sick days or not.(sounds like your Mom doesn't it! :) )
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Clearing "previous" selection sets
« Reply #29 on: November 09, 2009, 11:32:44 AM »
funny thing ... white blood cell count is normal, the only thing that seems to be working is an oral steroid, but now that I am nearing the end of that treatment, it seems to be stabilizing and not getting any better ... but the pain is managable with ibuprofen .. at least the 104F fever is gone ;)
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Clearing "previous" selection sets
« Reply #30 on: November 11, 2009, 01:21:11 PM »
I can't think of a perfect way to do what you want.  To me, one would have to be able to pass ' ssget ' a previous selection set, and run with that, but since that can't be done, then I would go the ' grread ' way that we did with the select attributes routine Gile and I worked on, but that has the problem of not being able to remove entities.  One could work the removal out, but not with the shift button option, by default at least.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.