Jump to content

Recommended Posts

Posted
Pass :wink:

I'm with Lee on this one. Won't be easy to emulate.

 

This will 'sort-of' do what you want, but it's ugly...

 

(defun test (/ *error* check ent)
 (setq *error* (lambda (x)
                 (and check
                      (vla-put-mspace
                        (vla-get-activedocument (vlax-get-acad-object))
                        :vlax-false
                      ) ;_ vla-put-mspace
                 ) ;_ and
               ) ;_ lambda
 ) ;_ setq
 (and (setq check (zerop (getvar 'tilemode)))
      (vla-put-mspace (vla-get-activedocument (vlax-get-acad-object)) :vlax-true)
 ) ;_ and
 (while
   (progn
     (setq ent (car (entsel "\nSelect Arc: ")))

     (cond ((eq 'ENAME (type ent))

            (if (not (and (eq "ARC" (cdr (assoc 0 (entget ent))))
                          (eq "0" (cdr (assoc 8 (entget ent))))
                     ) ;_ and
                ) ;_ not

              (princ "\n** Object is not an Arc on Layer \"0\" **")
            ) ;_ if
           )

           ((princ "\n** Nothing Selected **"))
     ) ;_ cond
   ) ;_ progn
 ) ;_ while
 (*error* nil)
 ent
) ;_ defun

 

If I were to use this, I'd do a bit of cleaning up (serves it's purpose of demonstration). I'd also incorporate the check of (getvar 'errno) to enable the user to right-click out.

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • KRBeckman

    9

  • Lee Mac

    7

  • alanjt

    4

  • CALCAD

    1

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...