nataca Posted February 26, 2011 Share Posted February 26, 2011 I have problem: (atoms-family 1) -> list variable, function... How to sort or get Variables (create by Autolisp, and not Autocad)? Thanks. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted February 26, 2011 Share Posted February 26, 2011 Is this what you mean ... (setq a 1 b 2 c 3) (atoms-family 1 '("a" "b" "c" "d")) Would return d as NIL ("A" "B" "C" nil) Tharwat Quote Link to comment Share on other sites More sharing options...
pBe Posted February 26, 2011 Share Posted February 26, 2011 Try this Atoms by MP or http://www.theswamp.org/index.php?topic=30256.msg358398#msg358398 You may need to sign-up atoms16.zip Quote Link to comment Share on other sites More sharing options...
nataca Posted February 26, 2011 Author Share Posted February 26, 2011 (edited) thanks. I tried. But There are some Variables can't set ("READ ONLY") It's my code: (defun C:RSB (/ a b) (setq a (vl-remove-if '(lambda (x) (or (wcmatch x "*-*,*_*,C:,AC*,PI,@@@@@@@@@@@*") (not (member (type (eval (read x))) '(INT REAL LIST STR)))) ) ) (atoms-family 1))) (setq b (mapcar'(lambda (x) (set (read x) nil)) a)) (princ) ) Edited February 26, 2011 by nataca Quote Link to comment Share on other sites More sharing options...
pBe Posted February 26, 2011 Share Posted February 26, 2011 are your trying to set floating variables to nil? anyhoo... (defun c:RSB () (mapcar' (lambda (x) (set (setq ss (read x)) nil)) (vl-remove-if '(lambda (X) (or (wcmatch x "*-*,*_*,C:,AC*,PI,@@@@@@@@@@@*") (not (or (eq (type (eval (read x))) 'INT) (eq (type (eval (read x))) 'REAL) (eq (type (eval (read x))) 'LIST) (eq (type (eval (read x))) 'STR) )) ) ) (atoms-family 1))) (princ) ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.