查看单个帖子
旧 2009-04-25, 08:21 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 lisp中怎样调用自己编写的程序

lisp中怎样调用自己编写的程序
www.dimcax.com

(defun c:tt (/ a) (setq a(car(entsel)))(entdel a))
(defun c:tt1()
(c:tt)
(princ "hello")
)
命令: tt1
选择对象: hello"hello"
没有出现什么错误,你指的是什么错误?
需要解密fas、vlx请联系本人。
d
老兄理解错了,我重新举个例子:
;;定义一个和命令 erase 功能一样的程序
(defun c:tt (/ ss i)
(setq ss (ssget))
(repeat (setq i (sslength ss))
(entdel (ssname ss (setq i (1- i))))
)
(princ)
)
;;调用command
(defun c:tt1 (/ a)
(setq a (ssget))
(command "_.erase" a "")
)
;;调用c:tt
(defun c:tt1 (/ a)
(setq a (ssget))
(c:tt a "");;我的意思是不能像command一样使用
)
将c:开头的函数注册为command,有时候会出错,不知为什么?
d
(defun c:xpp()
(c:xp "all" "" "i" "")
)
我的输入这段之后出现这样的错误提示:
command: xpp
; error: too many arguments
请问怎么回事
d
这样当然不能用了
需要解密fas、vlx请联系本人。
d
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)