satishrajdev Posted September 16, 2015 Share Posted September 16, 2015 Where am i making mistake??? Tiles are setting up with variables (MAPCAR '(LAMBDA (X) (IF (OR (EQUAL (EVAL (CAR X)) NIL) (EQUAL (EVAL (CAR X)) "")) (SET (CAR X) (CADR X)) [color="red"](SET_TILE (VL-PRIN1-TO-STRING (CAR X)) (EVAL (CAR X))) [/color] ) ) (LIST (LIST 'ALS$HT "") (LIST 'ALS$WD "")) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 16, 2015 Share Posted September 16, 2015 I would suggest: (mapcar '(lambda ( sym val ) (if (member (eval (read sym)) '(nil "")) (set (read sym) val) (set_tile sym (eval (read sym))) ) ) '("ALS$HT" "ALS$WD") '("" "") ) Or (foreach sym '("ALS$HT" "ALS$WD") (if (not (setq val (eval (read sym)))) (set (read sym) "") (set_tile sym val) ) ) Or: (foreach sym '(ALS$HT ALS$WD) (if (not (eval sym)) (set sym "") (set_tile (vl-symbol-name sym) (eval sym)) ) ) Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted September 16, 2015 Author Share Posted September 16, 2015 Bang on.... Worked like a charm.... Thank you sir Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 16, 2015 Share Posted September 16, 2015 You're most welcome Satish 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.