本帖最后由 dcl1214 于 2024-4-17 09:23 编辑
- (defun $make-mline$ (kd lst / e-o e-n pt)
- ;($make-mline$ "随便" nil)
- (or (and kd (member (type kd) (list 'int 'real)))
- (setq kd 3.0)
- )
- (setq e-o (entlast))
- (WHILE (NOT PT)
- (setq pt (VL-CATCH-ALL-APPLY 'getpoint (LIST "请点击起点")))
- (IF (VL-CATCH-ALL-ERROR-P PT)
- (SETQ PT NIL)
- )
- )
- (vl-catch-all-apply
- (function (lambda ()
- (vl-cmdf "_.Mline" "S" kd "non" pt)
- )
- )
- )
- (vl-catch-all-apply
- (function (lambda ()
- (while (= 1 (logand 1 (getvar 'cmdactive)))
- (PRINT "请点击下一点")
- (vl-cmdf "\\")
- )
- )
- )
- )
- (setq e-n (entlast))
- (if (equal e-o e-n)
- (setq e-n nil)
- )
- e-n
- )
|