솔리드 편하게 넣는 리습인데 뭐가 잘못됐을까요???
(defun c:qso(/ cla os ortho pt-list k num b2 p1 b1 ss)
(if (= nil (tblsearch “layer” “S-253”))
(command “m” “S-253” “c” 253 “” “l” “continuous” “” “”)
)
(setq cla (getvar “clayer”))
(setq os (getvar “osmode”))
(setq ortho (getvar “orthomode”))
(setq pt-list ‘() k 0 num nil b2 0)
(setvar “orthomode” 0)
(setvar “clayer” “S-253”)
(command “undo” “be”)
(initget 128)
(setq p1 (getpoint “nFirst point & 객체선택(S):”))
(if (listp p1)
(progn
(command “pline”)
(while p1
(command p1)
(setq pt-list (append pt-list (list p1)))
(setq p1 (getpoint p1 “nNext point:”))
)
(setq num (length pt-list))
(if (> num 1) (command “c”) (command “”))
(setvar “osmode” 0)
(cond ((=num 1)
(setq b1 (entlast))
(command “boundary” (nth 0 pt-list) “”)
(setq b2 (entnext b1))
)
((= num 2)
(entdel (ent last))
(command “rectangle” (nth 0 pt-list) (nth 1 pt-list))
)
)
(if (/= b2 nil)
(progn
(setq ss (entlast))
(command “hatch” “solid” ss “”)
(entdel ss)
(command “draworder” (entlast) “” “b”)
)
(alert “n선이 떨어져있습니다! 확인요망!”)
)
(;progn
(progn
(setq ss (ssget (list (cons 0 “lwpolyline”)))
(if ss
(progn
(command “hatch” “solid” ss “”)
(command “draworder” (entlast) “” “b”)
)
)
)
)
(command “undo” “e”)
(setvar “osmode” os)
(setvar “orthomode” ortho)
(setvar “clayer” cla)
(princ)
)
공유