0 Members and 1 Guest are viewing this topic.
What's wrong with it?
;Tip1719: HVBA.LSP Break crossing lines (c)2001, Azfar Mahmood $50 Bonus Winner(defun C:HVBA (/ INGET FPT GETD ENAME ENAME1 ENT1 ENT2 SS1 SS2 SS3 SS4) (setvar "cmdecho" 0) (initget "H V") (setq INGET (getkword "\n<H>orizontal <V>ertical Break <H>=> :")) (setq GETD (getreal "\nBreak Length ---- | ----: ")) (prompt "\nNow move Crosshairs near each intersection to break <press Enter to stop> :") (setq ENAME "LINE") (setq ENAME1 "LINE") (while GETD (setq FPT (osnap (cadr (grread 1)) "int")) (if (/= FPT NIL) (setq SS1 (nentselp (polar FPT 0.00 GETD)) SS2 (nentselp (polar FPT 3.14 GETD)) SS3 (nentselp (polar FPT 1.57 GETD)) SS4 (nentselp (polar FPT 4.71 GETD)) ENT1 (ssget (polar FPT 0.00 GETD)) ENT2 (ssget (polar FPT 1.57 GETD)))) (if (and (/= ENT1 NIL) (/= ENT2 NIL)) (progn (setq ENAME (cdr (assoc 0 (entget (ssname ENT1 0))))) (setq ENAME1 (cdr (assoc 0 (entget (ssname ENT2 0))))))) (if (and (/= ENAME "LINE") (/= ENAME "LWPOLYLINE") (or (= INGET "H") (= INGET NIL))) (progn (print "Entity is not a Line or Polyline") (setq FPT NIL))) (if (and (/= ENAME1 "LINE") (/= ENAME1 "LWPOLYLINE") (= INGET "V")) (progn (print "Entity is not a Line or Polyline") (setq FPT NIL))) (if (and (/= FPT NIL) (/= SS1 NIL) (/= SS2 NIL) (/= SS3 NIL) (/= SS4 NIL) (or (= INGET "H") (= INGET NIL))) (command ".BREAK" (cadr SS1) (cadr SS2))) (if (and (/= FPT NIL) (= INGET "V") (/= SS1 NIL) (/= SS2 NIL) (/= SS3 NIL) (/= SS4 NIL)) (command ".BREAK" (cadr SS3) (cadr SS4))))) ;EOF
Quote from: Daron on January 04, 2008, 08:48:55 AMWhat's wrong with it?It's all commented out!!
For my routine, I simply pour a cup of java, then add a little hazelnut, and go talk to one of the secretaries or visit the guys in the shop. It's all automated.