at 라는 lsp을 쓰면은,osnap의 체크된 부분이 없어짐니다.
아래 lsp에서 어떻게 해야 되는지…
(defun c:at (/ radd L:1 L:22 L1 L2 L3 dist dist11 dist22 dist1)
(setvar “cmdecho” 0)
(setvar “blipmode” 0)
(command “color” “bylayer”)
(if (tblsearch “layer” “3”)
(command “layer” “s” “3” “”)
(progn
(command “layer” “new” “wire” “color” “3” “3” “”)
(command “layer” “s” “3” “”)
)
)
; (command “layer” “unlock” “*” “”)
(prompt “n Automatic wire… “)
(setq radd (getvar “filletrad”))
(setq radd (fix radd))
(prompt “n How much Fillet Radius <")
(prin1 radd)
(setq L:1 (getdist “> : “))
(if (/= L:1 nil)
(progn
(setvar “filletrad” L:1)
(setq radd L:1)
)
(setq L:1 radd)
)
(command “osnap” “QUA,MID”)
(setq old_osnap (getvar “osmode”))
(setq L1 (getpoint “n Pick First line point : “))
(setq L2 (getcorner L1 “n Pick Second point : “))
(setvar “osmode” old_osnap)
(setq L3 (list (car L1) (cadr L2)))
(setq dist11 (distance L3 L1))
(setq dist22 (distance L2 L3))
(if (< dist11 dist22)
(setq dist dist11)
(setq dist dist22)
)
(if (< dist L:1)
(setq L:1 (* 3 (/ dist 4)))
)
(if (or (= (car L1) (car L2)) (= (cadr L1) (cadr L2)))
(command “line” L1 L2 “”)
(progn
(command “pline” L1 “w” “0” “” L3 L2 “”)
(command “fillet” “r” L:1)
(command “fillet” “p” “L”)
(setvar “filletrad” radd)
)
)
(if (tblsearch “layer” “3”)
(command “chprop” “l” “” “la” “3” “c” “bylayer” “”)
(progn
(command “layer” “new” “wire” “color” “3” “3” “”)
(command “chprop” “l” “” “la” “wire” “c” “bylayer” “”)
)
)
(setvar “blipmode” 0)
)
===다른것은 안됩니다=== 밑에 작업을 한것을 보세요
defun c:Attt(/ dist1 dist2 L1 L2 L3 L4 L22 L:1 radd kk)
(setvar “cmdecho” 0)
(setvar “blipmode” 0)
(command “color” “bylayer”)
(if (tblsearch “layer” “3”)
(command “layer” “s” “3” “”)
(progn
(command “layer” “new” “3” “color” “3” “3” “”)
(command “layer” “s” “3” “”)
)
)
; (command “layer” “unlock” “*” “”)
(prompt “n Automatic 3… “)
(setq radd (getvar “filletrad”))
(setq radd (fix radd))
(prompt “n How much Fillet Radius <")
(prin1 radd)
(setq L:1 (getdist “> : “))
(if (/= L:1 nil)
(progn
(setvar “filletrad” L:1)
(setq radd L:1)
)
(setq L:1 radd)
)
(setq old_osnap (getvar “osmode”))
(command “osnap” “QUA,MID”)
(SETQ L22 (GETPOINT “Pick First line point : “))
(setq L1 (getpoint L22 “n Pick First line point : “))
(command “osnap” “none”)
(setq L2 (getpoint L1 “n Distance line point : “))
(command “osnap” “QUA,MID”)
(setq L4 (getpoint “n Pick Last point : “))
(setvar “osmode” old_osnap)
(setvar “blipmode” 0)
(if (/= (cadr L1) (cadr L2))
(setq L3 (list (car L4) (cadr L2)))
(setq L3 (list (car L2) (cadr L4)))
)
(setq dist1 (distance L1 L2))
(setq dist2 (distance L3 L4))
(if (< dist1 dist2)
(setq kk dist1)
(setq kk dist2)
)
(if (< kk L:1)
(setq L:1 (* 3 (/ kk 4)))
(setvar “osmode” old_osnap)
)
(command “pline” L22 L1 “w” “0” “” L2 L3 L4 “”)
(command “fillet” “r” L:1)
(command “fillet” “p” “L”)
(setvar “filletrad” radd)
(if (tblsearch “layer” “3”)