再多一点
- (defun c:test ( / lst ans)
- (setq lst (vanilla_getatts (car (entsel "\nPick attributed block: ")))))
- (setq tagname (getstring "Please enter tag name"))
- (setq x 0)
- (repeat (length lst)
- (if (= (nth 0 (nth x lst)) tagname)(setq ans (cdr (assoc tagname lst))))
- (setq x (+ x 1))
- )
- (alert (strcat "Value is = " ans))
- )
|