CANDOWE Posted May 19, 2023 Posted May 19, 2023 Gentlemen, Good morning, good afternoon, and good night. Now i want my routine to realise this function, 1> input the command name; 2> select object; 3> press <spacebar> to end selection. 4> excute the command with the selection as an variable. I don't know if I explain my need exactly, but it's much like <erase> command , input command "e" ,select object either frame selection or picking one by one ,then press the <spacebar> button ,then all selected object will be ereased. Quote
CANDOWE Posted May 19, 2023 Author Posted May 19, 2023 43 minutes ago, BIGAL said: Which command ? It's not a command that comes with AUTOCAD, it's a routine I wrote myself. Because my program requires me to first select objects by using a window selection, and then individually select each object before pressing the space bar to execute a batch operation. I just want to know how to end the current selection and execute the remaining operation commands after pressing the space bar. -Above all translated by CHATGPT3.5 Quote
mhupp Posted May 19, 2023 Posted May 19, 2023 (edited) That sounds like you just need to use a simple ssget (setq ss (ssget)) ;user selects objects with mouse either by window or pickking one by one ;stores the selection as "ss" to be called later. (command "_.Erase" SS "") ;this will erase everything selected. Ask CHATGPT about ssget. Edited May 19, 2023 by mhupp Quote
CANDOWE Posted May 22, 2023 Author Posted May 22, 2023 On 5/19/2023 at 11:11 AM, mhupp said: That sounds like you just need to use a simple ssget (setq ss (ssget)) ;user selects objects with mouse either by window or pickking one by one ;stores the selection as "ss" to be called later. (command "_.Erase" SS "") ;this will erase everything selected. Ask CHATGPT about ssget. the most important thing for this routine is how to end selection and continue to run the rest of the routine. Quote
Recommended Posts
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.