getkword

Martin (archive)

Usenet Archive
Joined
Aug 1, 2000
Messages
245
Reaction score
0
i'm building a code where i make a choice at some point either to enter (Enter) and select all objects with certain specifications OR otherwise get the choice to select a window. i know the (getkword) which handels strings as an option but i do not know if it handels (enter or " ") the same way. may be there are other ways?
martin
 
what about:

(prompt "\nSelect Objects or <enter> for all: ")
(cond((ssget))((ssget"X")))
 
Martin,

Consider using SSGET rather then GETKWORD in this situation.

First, it isn't necessary to write any code when prompting the user to either select all objects or select objects by window. As you know (ssget) will select all objects if the user types "all" followed by an enter, or select by window if the user enters "w" etc.

Second, pressing enter to "Select All" is not a typical prompt from AutoCAD's built in commands (although I'm sure there are exceptions). In other words, using (ssget) prompts the user in a more natural way, consistent with AutoCAD's typical prompts and therefore the user's learned responses.

Just my 2 cents.

Regards,
Steve Doman
 

Latest threads

Back
Top