(defun c:dp ( / *error* e o p ) ;;Lee Mac Program
;;; see topic:http://www.cadtutor.net/forum/showthread.php?76853-Bisect-Line-and-draw-perpendicular-line-at-midpoint
(setvar "osmode" 167) ; osnap end,center,intersection,midpoint,quadrant and perpendicular ONLY
(defun *error* ( m )
(if o (progn (setvar 'orthomode o) (command "_.ucs" "_p")))
(princ)
)
(if (and
(setq p (getpoint "\nSpecify first point: "))
(setq e (car (nentselp p)))
)
(progn
(setq p (trans p 1 0))
(command "_.ucs" "_ob" e)
(setq o (getvar 'orthomode))
(setvar 'orthomode 1)
(command "_.line" "_non" (trans p 0 1))
(while (< 0 (getvar 'cmdactive)) (command "\\"))
(setvar 'orthomode o)
(command "_.ucs" "_p")
)
)
(princ)
)
(c:dp)

Advertisements