1. IMO, in your case no needs cond , suggestions colored
2. (c:copym) ; is a command of express tool not a common command
3. (dtr 0) = 0
- (defun c:ww (/ P1 P2 P3 P4 Ang1 Dist1 Dist2 hole1a hole1b Copies)(savevartoold) (if (and (setq P1 (getpoint "\n Select a Point : ")) (setq P2 (getpoint P1 "\n Select a Point : ")) (setq Dist1 (distance P1 P2) Dist2 (- Dist1 40.0) Ang1 (angle P1 P2) P3 (polar P1 [color="red"]0.0[/color] 20.) P4 (polar P3 [color="red"]0.0[/color] Dist2) [b]Copies[/b] [color="red"](if (< 0.0 Dist2 1200.) (1+ (fix (/ Dist2 200.))) ) [/color] ) [color="red"](setq hole1a (entmakex (list '(0 . "CIRCLE") (cons 10 (polar P1 (+ ang1 0.) 20.0)) '(40 . 3.2))))[/color] )[color="red"] (vl-cmdf "-array" "_non" hole1a "" "r" 1 Copies (/ (distance p3 p4) Copies)) [/color][color="green"]; like this??[/color] [color="green"];;; (acet-copym-divide (ssadd hole1a) p3 p4 copies) ;express tool [/color] (alert [color="purple"]"\nLimits! 0 < x < 1200 !!"[/color]) ) (princ) )
p/s: im not familiar with 'command' call , "_non" instead of (setvar 'osmode 0) not tested. i prefer vla-arrayrectangular |