There are two ASILISP functions that help here. Both return cursors to system tables so you can step through the records to find what you need. For example, this code will return all the available providers:返回所有可用的供应商:
(defun c:getprov ( / fasi_kword fasi_curs fasi_row)
;;; Note that ASILISP *must* be loaded first.
(verify_arxapp_loaded "asilisp")
(setq fasi_curs (asi_providers))
(if (asi_open fasi_curs)
(prompt "\nasi_open successful.")
(prompt "\nasi_open failed!")
)
(print fasi_curs)
(while (/= fasi_kword "eXit")
(initget 1 "First Last Next Prior eXit")
(setq fasi_kword (getkword "\nDisplay Row: (First Last Next Prior eXit)"))
(if (/= fasi_kword "eXit")
(progn (setq fasi_row (asi_fetch fasi_curs fasi_kword))
(if fasi_row (print fasi_row)
(prompt "\nNothing to fetch or asi_fetch failed.")
)
)
)
)
(if (asi_close fasi_curs)
(prompt "\nasi_close successful.")
(prompt "\nasi_close failed!")
)
(princ)
)