JLG Posted December 3, 2009 Posted December 3, 2009 i know this is probably a simple question I'm just looking for the command that clears all selection sets. I appreciate the help! Quote
Lee Mac Posted December 3, 2009 Posted December 3, 2009 (sssetfirst) is the first thing that came to mind Quote
JLG Posted December 3, 2009 Author Posted December 3, 2009 That didnt seem to clear the active SS. I just need a command to run before a macro that uses the "p" command. Quote
JohnM Posted December 3, 2009 Posted December 3, 2009 Maybe I don’t understand. If you clear all selection sets then the “P” (previous) option will not find any selection sets. Quote
Lee Mac Posted December 3, 2009 Posted December 3, 2009 What Lee posted should work. Well - it clears the visible selection, but if a selection set has been created, perhaps using ssget, then previous will still detect it. Quote
alanjt Posted December 3, 2009 Posted December 3, 2009 Well - it clears the visible selection, but if a selection set has been created, perhaps using ssget, then previous will still detect it. Of course, it's the last thing that was selected. Wait, what was the question? I'm dumb. LoL Quote
David Bethel Posted December 3, 2009 Posted December 3, 2009 i know this is probably a simple question I'm just looking for the command that clears all selection sets. I appreciate the help! Actually it is not a real simple one. I think that you are going have to: Create an temporary entityCreate an empty selection set (ssadd) Add the last entity to the empty selection set Erase the selection set To get back to the 'No previous selection set' message. -David Quote
JLG Posted December 3, 2009 Author Posted December 3, 2009 How about (sssetfirst)(ssadd); ? Seems to work, clears visible selection and then creates an empty ss. So far so good thank you! Quote
Lee Mac Posted December 3, 2009 Posted December 3, 2009 How about (sssetfirst)(ssadd); ? Seems to work, clears visible selection and then creates an empty ss. So far so good thank you! Nice idea! Quote
CarlB Posted December 3, 2009 Posted December 3, 2009 Hmmm, that didn't clear the "previous" for me...maybe my AutoCAD has a good memory. Quote
Steve Doman Posted December 5, 2009 Posted December 5, 2009 The following might work for you. (defun clearprevss () ;; Written by AutoDesk Bonus Tools R14 ;; ClearPrevSS - clears the previous selection set by ;; executing the select command and then performing an undo 1. ;; This function does not verify that undo is enabled and will ;; fail if undo is disabled. (if (entnext) (progn (command ".select" (entlast) (entnext)) (while (not (equal (getvar "cmdnames") "")) (command "")) (command ".undo" "1") ) ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.