Jump to content

how to use <spacebar> to end selection and continue to excute the rest command?


Recommended Posts

Posted

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.

Posted
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

Posted (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 by mhupp
Posted
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.

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