jpkibble
19.11.2010, 17:01
I've recently been getting into Lisp with AutoCAD2006 with some success, however the following routine is giving me a headache.It should draw a simple array of vertical lines 100 high at 25 unit intervals, it works fine but after a few test runs it starts doing funny things, missing every other line...missing lots of random lines or even spuriously joining lines to nearby objects. All very strange - have you any ideas why it might be happening?(defun c:SPR ()(setq leng (getint "Enter Length of Section in Metres:"))(setq sectionstart (getpoint "\nPick Insertion point:"))(setq aa (car sectionstart))(setq bb (cadr sectionstart))(setq rptn (+ 1 (fix (/ leng 25))))(command "line" (list (+ aa leng) bb) (list (+ aa leng) (+ bb 100)) ""); Repeat loop starts here(repeat rptn(command "line" (list aa bb) (list aa (+ bb 100) ) "") (setq aa (+ aa 25)) ); Repeat loop stops here)jpkibble2010-11-19 17:02:35