这个宏有什么问题?
我创建了一个CUI宏来绘制revcloud^C^Cpline;revcloud;arc;500;500;object;last;;
宏绘制pline,不应用revcloud命令 你需要“普林”吗? 我正在为我工作的公司创建一个CUI
我想要的是,用户绘制线(pline),然后将这些线转换为revcloud。
我想使用弧长作为所有用户的标准。
有什么建议吗
从多段线构建云线时,多段线必须闭合。我有两分钟的时间,所以这个Lisp程序将完成同样的事情:
; Polyline Revcloud by Lee McDonnell 21/12/2008
(defun c:prev (/ *error* l1 l2)
(defun *error* (msg)
(setvar "cmdecho" 1)
(if (= msg "")
(princ "\nFunction Complete.")
(princ "\nError or Esc Pressed!")
) ;_end if
(princ)
) ;_end defun
(setvar "cmdecho" 0)
(prompt "\nConstruct Polyline.")
(command "_pline")
(while (> (getvar "cmdactive") 0) (command pause))
(setq l1 (entlast))
(command "_pedit" l1 "c" "")
(setq l2 (entlast))
(prompt "\nReverse Cloud Direction? : ")
(command "_revcloud" "o" l2 pause)
(*error* "")
(princ)
) ;_end defun
这是不是意味着,我不能使用宏? 好吧,让我们只说,使用宏来完成相同的任务会很尴尬,因为宏必须确保在执行到rev云的转换之前闭合多段线-我个人会选择LISP。 就我个人而言,我喜欢LISP,但当处理60多台电脑时,我会将LISP加载到所有这些电脑上。
在这种情况下,我更喜欢制作CUI按钮(菜单在服务器上共享)
我们可以用它来确保pline是闭合的
好的,没问题-只是给你提供了另一个选择。 可能对于现有多段线:
; Polyline Rev-cloud by Lee McDonnell (Polyline Selection) - 21/12/2008
(defun c:prev2 (/ *error* ent ent1)
(defun *error* (msg)
(setvar "cmdecho" 1)
(if (= msg "")
(princ "\nFunction Complete.")
(princ "\nError or Esc Pressed!")
) ;_end if
(princ)
) ;_end defun
(setvar "cmdecho" 0)
(while
(setq ent (entsel "\nSelect Polyline: "))
(command "_pedit" ent "c" "")
(setq ent1 (entlast))
(prompt "\nReverse Direction of Cloud? <No> : ")
(command "_revcloud" "O" ent1 pause)
) ;_end while
(*error* "")
(princ)
) ;_end defun
(有点得意忘形) 李先生
你怎么写LISP?
使用记事本,还是什么?
页:
[1]
2