yulb 发表于 2002-12-15 19:03:00

[求助]向Autolisp返回变量值的问题?

在ARX中有如下的句子:
int ff=10;
acedRetInt(ff);
执行以后,在AutoCAD命令行下输入!ff   ,返回nil,没有值是怎么回事啊?

goldenshin 发表于 2002-12-16 08:52:00

(setq ff yourcommand)

yulb 发表于 2002-12-16 12:10:00

谢谢,下来试试!

yulb 发表于 2002-12-17 17:30:00

还是不行,也不知怎么办,再请教大侠!有个例子最好。

[此贴子已经被作者于2002-12-17 17:30:43编辑过]

yulb 发表于 2002-12-18 17:35:00

重新求助,麻烦斑竹解救!!!(上面的老问题)

goldenshin 发表于 2002-12-18 18:09:00

->

在ARX中
1. using "defun" to create a command.(eg,test1)
2.
int test1(double a1,char a2[])
{
.....
as you say!
}
3. In lisp (or AutoCAD)
(setq ff (test1 3.122 "abcdeff"))
! ff
===================================
This means, you send datas (A double 3.122 and a string "abcdeff") from lisp to arx and get a returned data which saved in ff
页: [1]
查看完整版本: [求助]向Autolisp返回变量值的问题?