Jump to content

Recommended Posts

Posted

i know this is probably a simple question I'm just looking for the command that clears all selection sets. I appreciate the help!

Posted

That didnt seem to clear the active SS. I just need a command to run before a macro that uses the "p" command.

Posted

Maybe I don’t understand. If you clear all selection sets then the “P” (previous) option will not find any selection sets.

Posted
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.

Posted
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

Posted
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 entity
  • Create 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

Posted

How about (sssetfirst)(ssadd); ? Seems to work, clears visible selection and then creates an empty ss. So far so good thank you!

Posted
How about (sssetfirst)(ssadd); ? Seems to work, clears visible selection and then creates an empty ss. So far so good thank you!

 

Nice idea! :)

Posted

Hmmm, that didn't clear the "previous" for me...maybe my AutoCAD has a good memory.

Posted

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")
   )
 )
)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...