lisp开发必备:AutoCAD内部函数列出工具

工具代码:

  1. (defun c:test ()
    (setq funn (getstring “\nFunction Name <*>: “))
    (if (= funn “”)(setq funn “*”))
    (setq fl (vl-remove-if-not
    (function (lambda (i)(wcmatch i (strcase funn))))
    (atoms-family 1)
    )
    )
    (if fl
    (foreach i (acad_strlsort fl)(write-line i))
    (alert “no function definition!”)
    )
    (princ)
    )
  2. 将此代码另存为lisp文件,直接加载到CAD中(版本不限),使用test命令即可查看

发表回复