What's wrong with this?
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
however if I paste one line at a time it seems to work.what am I missing? probably something very simple. Should start with:
(defun C:Test1 () I Fee Like An Idiot! 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 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) )
页:
[1]