Hi, I need a help for a autolisp program: --start--- (defun c:trat () (setq tt 0) (setq trat (getreal "\nLunghezza tratteggio: ")) (while (= tt 0) (setvar "OSMODE" 1) (setq s1 (entsel "\nSeleziona la linea da tratteggiare\n")) (setq ent (entget (car s1))) (setq pt1 (cdr (assoc 10 ent))) (setq pt2 (cdr (assoc 11 ent))) (setq lung (distance pt1 pt2)) (command "_UCS" "_ob" s1) (command "._ERASE" s1 "") (setq pt1 nil) (setq pt2 nil) (setq pt1 (list 0 0 0)) (setq pt2 (list lung 0 0)) ;(command "_line" pt1 pt2 "") ;(command "_UCS" "_w" "") ;------------------------ (setq x1 0) (setq x2 lung) (setq xa x1) (setq xb (+ x1 trat)) ;(while (or(< xb (max x1 x2)) (< xa (max x1 x2))) (setvar "OSMODE" 0) (while (< xb (- lung trat)) (print lung) (print (- lung trat)) (print xb) (print xa) (setq pta (list xa 0 0)) (setq ptb (list xb 0 0)) (command "_line" pta ptb "") (setq xa nil) (setq xa (+ xb trat)) (setq xb nil) (setq xb (+ xa trat)) (setq pta nil) (setq ptb nil) ) (setq pta (list xa 0 0)) (setq xb nil) (setq xb x2) (setq ptb (list xb 0 0)) (command "_line" pta ptb "") (command "_ucs" "_w") ;(setvar "OSMODE" 1) (command) (command "-osnap" "END,MID,CEN,NOD,QUA,INT,INS,PERP,TAN,APP,EXT,PAR") ) ) --end-- why the last command "-osnap" doesnt work? Why if I use the command alone it works? Thank's Pj
I think, you better use For me (using AutoCAD 2008), ALL = 15359 while the combo chosen by the OP is 14847