getkword

Discussion in 'AutoCAD' started by martin, Aug 13, 2003.

  1. martin

    martin Guest

    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
     
    martin, Aug 13, 2003
    #1
  2. martin

    mataeux Guest

    what about:

    (prompt "\nSelect Objects or <enter> for all: ")
    (cond((ssget))((ssget"X")))
     
    mataeux, Aug 14, 2003
    #2
  3. martin

    Steve Doman Guest

    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
     
    Steve Doman, Aug 14, 2003
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.