- UID
- 1
- 积分
- 16111
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
发表于 2002-3-12 12:24:49
|
显示全部楼层
Re: [LISP程序]:如何获取cad运行期间所有lisp变量名称?
最初由 fylinwater 发布
[B]如何获取cad运行期间所有lisp变量名称? [/B]
使用函数:
atoms-family
Returns a list of the currently defined symbols
(atoms-family format [symlist])
Arguments
format
An integer value of 0 or 1 that determines the format in which atoms-family returns the symbol names:
0 Return the symbol names as a list
1 Return the symbol names as a list of strings
symlist
A list of strings that specify the symbol names you want atoms-family to search for.
Return Values
A list of symbols. If you specify symlist, then atoms-family returns the specified symbols that are currently defined, and returns nil for those symbols that are not defined.
Examples
Command: (atoms-family 0)
(BNS_PRE_SEL FITSTR2LEN C:AI_SPHERE ALERT DEFUN C:BEXTEND REM_GROUP
B_RESTORE_SYSVARS BNS_CMD_EXIT LISPED FNSPLITL...
The following code verifies that the symbols CAR, CDR, and XYZ are defined, and returns the list as strings:
Command: (atoms-family 1 '("CAR" "CDR" "XYZ"))
("CAR" "CDR" nil)
The return value shows that the symbol XYZ is not defined. |
|