entsel missed pick

Discussion in 'AutoCAD' started by Clarence, Dec 23, 2004.

  1. Clarence

    Clarence Guest

    I'm working on a rather complicated lisp right now, and I am in need of help. I can't figure out how to make entsel reprocess if an object is missed. But what I have kills the command instead of reprocessing or going to the next step. I have made many attempts to figure this out. This is just where I've decided, "ok, I am not going to figure this out. Get help!!!" I believe my biggest problem is that I've never used V functions before.

    If I miss the pick I want to rerun (c:pickobj), but when I get an object I want it to run (objmtxt). Here's a small portion of the code:

    (defun c:pickobj ()
    (vl-load-com)
    (prompt "\nPick Polyline for Area Quantity Field\n")
    (while
    (= ent nil)
    (or (= ent nil) (= (getvar "errno") 52))
    (or (= ent nil) (= (getvar "errno") 7))
    (setq ent (vlax-ename->vla-object
    (car (entsel "Select Closed Polyline:"))
    )
    )
    (cond
    (if
    (= ent nil)
    (or (= ent nil) (= (getvar "errno") 52))
    (or (= ent nil) (= (getvar "errno") 7))
    (c:pickobj)
    )
    (if
    (/= ent nil)
    (or (/= ent nil) (/= (getvar "errno") 52))
    (or (/= ent nil) (/= (getvar "errno") 7))
    (c:eek:bjmtxt)
    ))
    )
    (princ)
    )

    Thanks for any help, comments, or suggestions!
     
    Clarence, Dec 23, 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.