View Full Version : how to retain previous selection
blasto
2009-03-10, 06:12 PM
hi there,
I need to create a selection set [plsset] as follows:
and when I do so, "plsset" selection also becomes previous selection set for autocad. any idea on how to avoid that and retain the "real_previous" selection as previous selection? or reset the previous selection completely? thanks
(defun c:sel()
(setq real_previous (ssget "P"))
(setq plsset (ssget "X" '((0 . "LWPOLYLINE"))))
)
andrea.andreetti
2009-03-13, 05:55 AM
hi there,
I need to create a selection set [plsset] as follows:
and when I do so, "plsset" selection also becomes previous selection set for autocad. any idea on how to avoid that and retain the "real_previous" selection as previous selection? or reset the previous selection completely? thanks
Like this...
(defun c:sel()
(setq real_previous (ssget "P"))
(setq plsset (ssget "X" '((0 . "LWPOLYLINE"))))
(command "._select" real_previous "")
)
blasto
2009-03-16, 03:31 PM
thanks for the suggestion. I've tried using (command "._select") as you said but I need to do that selection inside a "command reactor" call back subroutine thus I saw that it can not be used. If it was possible with vl functions it would be wonderful because they do not use the command interface.
Tom Beauford
2009-03-16, 04:47 PM
(sssetfirst nil real_previous)
Should do the trick.
blasto
2009-03-16, 06:31 PM
yes it did :) thank you very much !!
andrea.andreetti
2009-03-16, 06:57 PM
thanks for the suggestion. I've tried using (command "._select") as you said but I need to do that selection inside a "command reactor" call back subroutine thus I saw that it can not be used. If it was possible with vl functions it would be wonderful because they do not use the command interface.
I'm to late.. ;-|
that's why it is useful to have more info.
;-)
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.