本帖最后由 foolishzy 于 2022-4-25 22:54 编辑
选择集 list 互相转换
- (defun enamelist_to_pickset(sslst / ss)
- ;list 转换成选择集
- (setq ss (ssadd))
- (foreach n sslst
- (ssadd n ss)
- )
- ss
- )
- (defun pickset_to_enamelist(pickset / ss sslst )
- ;选择集转换成list
- (setq ss pickset sslst '())
- (while (setq n (ssname ss 0))
- (progn
- (setq sslst (append sslst (list n)))
- (ssdel n ss)
- )
- )
- sslst
- )
|