Using menu while in a loop w/ (grread)

Discussion in 'AutoCAD' started by ETenenbaum, Oct 12, 2004.

  1. ETenenbaum

    ETenenbaum Guest

    How to execute a command picked from a menu while in a loop with (grread)? In the following example, if a menu command was picked instead of a screen point, (ssget) is activated prompting to “Select objects:â€, but also allowing to execute the picked command, and then, after pressing ENTER, allowing to go back to the loop. How to allow executing a menu command (e.g. View->Zoom->Previous) without using (ssget), while in loop, please?
    Sincerely,
    Eugene Tenenbaum

    (defun c:grr (/ ob1 va pt obj)
    (while (not obj)
    (prompt "\nPick point: ")
    (setq va (car (setq ob1 (grread nil))) pt (cadr ob1) )
    (cond
    ( (= va 3) (setq obj 1) )
    ( (= va 11) (prompt "\nPick Icon: ") (ssget) )
    ) )
    )
     
    ETenenbaum, Oct 12, 2004
    #1
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.