Jump to content

SSFirst does not Highlight and Grip selection ?!


chavlji

Recommended Posts

The following code is suppose to

1.) Ask for random user selection

2.) and then select (Highlight and Grip) all Blocks in the drawing:

 

(defun C:SelectB()
(setq SS (ssget ":S")
(SSSetFirst nil (ssget "X" (list (cons 410 (getvar "CTab")) (cons 0 "INSERT)  ) ))

Here is the BUG I get:

If nothing is selected before calling SelectB, it asks for selection and then selects (highlight and grip) all blocks in the drawing.

But if something is selected before calling it then it does not ask user to select (it is normal) BUT it also does not highlight and grip new selections (all blocks).

All blocks still are selected, they are just not highlighted and gripped - if i then call MOVE it starts with moving all the blocks. But it is not highlighted. WHY ?!

 

*It is a part of larger program so I know the upper example does not make a useful sense...

Link to comment
Share on other sites

Hmmm... I think you may need to turn off any previous grips before using the sssetfirst, try this maybe:

 

(defun C:SelectB()
(setq SS (ssget ":S")
(sssetfirst nil nil)
(SSSetFirst nil (ssget "X" (list (cons 410 (getvar "CTab")) (cons 0 "INSERT))))

Link to comment
Share on other sites

Nope. Tried that before, but it didnt work. But thanks anyway.

 

Found this solution that works:

(defun C:SelectB()
(setq SS (ssget ":S")
(command "regenerate")
(SSSetFirst nil (ssget "X" (list (cons 410 (getvar "CTab")) (cons 0 "INSERT)))) 

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