Jump to content

Selection set question


JLG

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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