我也不知道怎么回事 可能是浏览器的问题
- (defun set-dxf (ename code val / ent)
- (setq ent (entget ename))
- (if (and (listp code) (listp val))
- (mapcar '(lambda (x y) (set-dxf ename x y)) code val)
- (progn
- (if (assoc code ent)
- (setq ent (subst (cons code val) (assoc code ent) ent))
- (setq ent (append ent (list (cons code val))))
- )
- (entmod ent)
- (entupd ename)
- )
- )
- ename
- )
- (defun c:1 ()
- (setvar "cmdecho" 0)
- (if (null pt1-2)
- (progn
- (setq
- pt1-1 (getpoint "\n点取第一个点:")
- pt1-2 (getcorner pt1-1 "\n点取第二个点:")
- )
- (command "rectang" pt1-1 pt1-2)
- (set-dxf (entlast) '(8 43 62) '("比对" 5 4))
- )
- )
- (command "zoom" "w" pt1-1 pt1-2)
- (princ)
- )
- (defun c:2 ()
- (setvar "cmdecho" 0)
- (if (null pt2-2)
- (progn
- (setq
- pt2-1 (getpoint "\n点取第一个点:")
- pt2-2 (getcorner pt2-1 "\n点取第二个点:")
- )
- (command "rectang" pt2-1 pt2-2)
- (set-dxf (entlast) '(8 43 62) '("比对" 5 4))
- )
- )
- (command "zoom" "w" pt2-1 pt2-2)
- (princ)
- )
- (defun c:10(/ ss)
- (setq
- pt1-1 nil
- pt1-2 nil
- pt2-1 nil
- pt2-2 nil
- )
- (setq ss(ssget "a" '((0 . "LWPOLYLINE")(8 . "比对"))))
- (if ss
- (command "erase" ss "")
- )
- (princ)
- )
|