07-31-2018
03:09 PM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
07-31-2018
03:09 PM
I have a lisp that is meant for lined duct work that i created for myself. I tried to give it to a coworker and it failed to work in their AutoCAD only drawing half of the lined duct... when he tried my reducer it was all in the same x coordinate making it look like a straight line up the y axis. Why does it work for me and not him? (p.s. I have AutoCAD 2017, he has AutoCAD 2018.)
Here is my straight lined duct code below.
(defun c:NewLinedDuct ()
(setvar "orthomode" 1)
(setq layr (getvar "clayer"))
(if (= ds nil)
(setq ds 999)
)
(if (= ds 999)
(progn
(setq ds (getreal "\nSheet metal Size?")
ld (getreal "\nEnter Liner Width")
pt1 (getpoint "\nSelect Starting Point...")
)
(setq pt2 (getpoint pt1 "\nSelect End Point"))
)
(progn
(setq pt2 (getpoint pt1 "\nSelect End Point"))
)
)
(command "-layer" "m" "M-DUCT" "c" "magenta" "M-DUCT" "")
(setq an1 (angle pt1 pt2))
(command "line" pt1 pt2 "")
(setq ss1 (ssget pt1)
nm1 (/ ds 2)
)
(setq nm2 (- nm1 ld))
(setq pt3 (polar pt1 (- an1 (/ pi 2.0)) 1)
pt4 (polar pt1 (+ an1 (/ pi 2.0)) 1)
)
;pt3 is point on one end of line
;pt4 is point on other end of line
;(it doesnt matter which is which side for now.)
(command "offset" nm1 ss1 pt3 "")
(command "offset" nm1 ss1 pt4 "")
(command "chprop" ss1 "" "c" "Green" "LT" "Hidden2" "")
(command "offset" nm2 ss1 pt4 "")
(setq ssx (ssget "l"))
(command "offset" nm2 ss1 pt3 "")
(setq ssy (ssget "l"))
(command "erase" ss1 "")
(setvar "clayer" layr)
(if (and ssxt ssyt)
(progn
(command "fillet" ssx ssxt)
(command "fillet" ssy ssyt)
(setq ssyt nil
ssxt nil)
)
)
(setq pt1 pt2)
(setvar "snapang" an1)
(princ)
)
¡Resuelto! Ir a solución.
Etiquetas (9)