guitarguy1685 Posted January 28, 2010 Posted January 28, 2010 The following is just my very first attempt at a lisp to change 5 attribute values in a block. So far I just want to see if I can even find the attribues via DXF codes. (defun C:Test1 (setq Ename (entlast)) (setq Att1 (entnext Ename)) (setq Att2 (entnext Att1)) (setq Att3 (entnext Att2)) (setq Att4 (entnext Att3)) (setq Att5 (entnext Att4)) (princ Att1) (princ Att2) (princ Att3) (princ Att4) (princ Att5) ) This is the error I get _$ ; error: bad element in arguments list: (ENTLAST) _$ however if I paste one line at a time it seems to work. what am I missing? probably something very simple. Quote
flowerrobot Posted January 28, 2010 Posted January 28, 2010 From the look of the code, It looks like your trying to explore and see values. Are you aware that in vlide, You can 'Watch" items and look at the value of Varriables? Flower Quote
Lee Mac Posted January 28, 2010 Posted January 28, 2010 This may be more use for your learning: (defun C:Test1 (/ Ename Att1 Att2 Att3 Att4 Att5) (setq Ename (entlast)) (setq Att1 (entnext Ename)) (setq Att2 (entnext Att1)) (setq Att3 (entnext Att2)) (setq Att4 (entnext Att3)) (setq Att5 (entnext Att4)) (princ (entget Att1)) (princ (entget Att2)) (princ (entget Att3)) (princ (entget Att4)) (princ (entget Att5)) (princ) ) Quote
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.