;;重来不用画这个,纯玩玩:),现编一个- (defun c:cenline ( / ss i ocen e pt out2) ;; out 全局.
- (princ "\n画圆心标志,选择标注实体:")
- (vl-cmdf ".undo" "be")
- (setq ss (ssget '((0 . "CIRCLE,ARC")))
- out2 (getdist (strcat "\n线出头长度" (if out (rtos out 2 2) "") ":"))
- i -1
- ocen (getvar "dimcen"))
- (if out2 (setq out out2))
- (while (setq e (ssname ss (setq i (1+ i))))
- (setvar "dimcen" (+ out (cdr (assoc 40 (entget e)))))
- (setq pt (vlax-curve-getstartpoint e))
- (vl-cmdf "dimcenter" (princ (list e pt)))
- )
- (setvar "dimcen" ocen)
- (vl-cmdf ".undo" "e")
- (princ)
- )
|