Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Anonymous
477 Vistas, 2 Respuestas

AutoLISP Help

Hello,

I trying to add something to a lisp command that I have which uses Lee Mac's Viewport Outline LISP to create an outline in model space from a viewport and then zoom to that outline in model and delete the outline. I just want to add a safeguard to prevent the lisp from continuing if I do not select something. How would I achieve this?

 

;;;Model zoom to viewport
(defun c:zb ()
  (c:vat)
  (setq a(entlast))
  (command "layout" "set" "model")
  (command "zoom" "object" a "")
  (command "erase" a "")
  (princ)
  )

"c:vat" is the Lee Mac Viewport Outline LISP.

 

Thank you!

Michael