nil selection and enter (return)

Discussion in 'AutoCAD' started by C Witt, Sep 20, 2004.

  1. C Witt

    C Witt Guest

    how can I get cad to tell the difference between a nil selection and the
    user just hitting enter (return)?

    they both have the same result "nil"..

    an example of this already in action is the offset command..
    Command: offset
    Specify offset distance or [Through] <Through>: Specify second point:
    Select object to offset or <exit>: ;nil selection, so it loops
    Select object to offset or <exit>: ;nil selection, so it loops
    Select object to offset or <exit>: ;nil selection, so it loops
    Select object to offset or <exit>: ;nil selection, so it loops
    Select object to offset or <exit>: ;hit enter (return) so exit


    cad can tell the difference, but I don't see how.

    please help me out here..
     
    C Witt, Sep 20, 2004
    #1
  2. C Witt

    T.Willey Guest

    ERRNO
    Enter new value for ERRNO <0>:

    Command: (entsel)

    Select object: nil

    Command: errno

    Enter new value for ERRNO <7>: 0 <--- returned when nothing selected (value 7)

    Command: (entsel)

    Select object:
    nil

    Command: errno

    Enter new value for ERRNO <52>: <---- returned when hit enter (value 52)

    Tim
    ps if you use this make sure you set errno to 0 when you start the routine each time.
     
    T.Willey, Sep 20, 2004
    #2
  3. C Witt

    C Witt Guest

    sweet. thank you.
     
    C Witt, Sep 20, 2004
    #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.