camillastn 发表于 2022-7-7 22:44:49

Shortcut/command for re-select

Hello, I am wondering if anyone knows what the command or shortcut is for re-selecting the objects that were most recently selected. I cannot remember it.
(Example, when I have selected a bunch of things, then accidently click off of them or go do something else but then want to select those same things again...)
 
Thank you!

Tiger 发表于 2022-7-7 23:11:37

 
You can use these codes to do selection insted of select command:
(DEFUN C:SSET ()(PRINC "\nSELECT A SET OF ENTITY...")(SETQ SSET (SSGET)))
After you run this code you need to use "sset" for selecting objects insted of select commandand then continue your work until you wand to do somthing with your selection set, for example you want to do copy them:
Use copy command at the first and then when you want to select object you must use "!sset" as a command at this time and you will see youe previouse selection is selected.
Aftr you use this command "sset" for selecting objects, these selection will be in the AutoCAD memory until you use this command ("sset") insted of select command again for selecting something else or closeing your AutoCad program.
As you see above of This page I posted this routine in another shape before and that means you can 1: add whatever you want to have selection set to this routine and 2: you can add this routine in to your acad.lsp file (it stored in Support Folder under the AutoCad program subfolder) and every time you open your AutoCad and you want to work, you have these commands in your hands.
Hope you can use and work whit that and can be useful.

camillastn 发表于 2022-7-7 23:22:27

 
 
I would highly recommend that you instead use ACADDOC.lsp
 
 
 
SET cannot be used as a variable name, as it is a LISP function.
 
Also, to add a slight degree of error prevention, consider this:
 

(DEFUN C:SET (/ ss) (PRINC "\nSELECT A SET OF ENTITY...") (if (SETQ ss (SSGET ;| Selection Set Filter Here |;))   (progn   ;; ...Code   )) (princ)) ;_end defun

Tiger 发表于 2022-7-7 23:30:52

Hi and After many thanks for your reply I just wanted to say I'm useing this routine for about 10 years and it works for me without any error...
And I think the codes are very simple for everyone wants to use it, and I do not recommend to make it busy... maybe it will cause misunderstanding for others.
Anyhow Thanks again.

RobDraw 发表于 2022-7-7 23:48:00

Please forgive my confusion... do you mean that you have been using ACAD.lsp, or your code for 10 years?
页: [1]
查看完整版本: Shortcut/command for re-select