还是不行啊 使用TT这个命令是可以限制次数 但是用加载在zz版说的那位置的程序根本就不受限制 为什么呢 我 随便贴一个加进去的程序 大神们帮我看看- (defun c:tt()
- (if (setq TMPTXT (open "C:\\Program Files\\WINDOWNS.TXT" "r")) (progn
- (setq tmpxx(atoi (read-line tmptxt)))
- (close TMPTXT)
- (setq TMPTXT (open "C:\\Program Files\\WINDOWNS.TXT" "w"))
- (write-line (itoa(1+ tmpxx)) tmptxt)
- (close TMPTXT)
- )
- (setq tmpxx 31);文件不存在就直接超次数
- )
- (if (< tmpxx 30) (progn
- (prompt "试用次数内")
- ;要用的程序加在这里
- ;; 直线变矩形
- (defun c:r1 ()
- (setvar "osmode" 0)
- (setq ww (getreal "\n请输入宽度: "))
- (prompt "\n框选欲变矩形的直线: ")
- (setq ss (ssget '((0 . "LINE")))
- d (* ww 0.5)
- i -1
- )
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq p1 (vlax-curve-getstartPoint s1)
- p2 (vlax-curve-getendPoint s1)
- r (+ (angle p1 p2) (* pi 0.5))
- )
- (command "pline" (polar p1 r (- d)) (polar p2 r (- d)) (polar p2 r d) (polar p1 r d) "c")
- )
- (princ)
- )
- ) (progn
- (alert "试用超过限制,注册联系QQ775452144")
- ))
- )
|