안녕하십니까
아래 리습은 UNIGRAPHICS에서 DXF나 IGES 2D로 변환해서 캐드로 불러들여서 저희 캐드환경에 맞는 레이어로 자동 변화하는
리습입니다…
근데 SPLINE경우는 CHANGE가 잘 안됩니다…되는것은 되구요…
그래서 LIST레이어로 CHANGE안되는 것을 보니깐 SPLINE이더라구요..
[CHANGE잘 되는것]
LINE Layer: “h”
Space: Model space
LineWeight: 0.00 mm
Handle = 728
[CHANGE 안되것]
SPLINE Layer: “WORKPIECE_FINAL”
Space: Model space
Color: 141 Linetype: “DASHED”
LineWeight: 0.00 mm
Handle = 959
그래서 아래 리습에 추가로 하고 싶은데…어떻게 해야 되는지 답변부탁드립니다…
첨부파일에 dxf를 아래 리습으로 변환해 보면 change가 안되는게 있습니다……
수고하십시요
(defun C:UG-ACAD1 ()
(setvar “cmdecho” 0)
(setq solide “2” DASHED “2” center “2” phantome “2” notee “2”)
(setq ulay1 (tblsearch “Ltype” “continuous”) ulay2 (tblsearch “Ltype” “dashed”)
ulay3 (tblsearch “Ltype” “phantom”) ulay4 (tblsearch “Ltype” “center”)
)
(command “layer” “m” “s” “c” “green” “” “lt” “continuous” “”
“m” “h” “c” “yellow” “” “lt” “dashed” “”
“m” “c” “c” “magenta” “” “lt” “center” “”
“m” “p” “c” “cyan” “” “lt” “phantom” “”
“m” “r” “c” “red” “” “lt” “continuous” “”
“m” “n” “c” “green” “” “lt” “continuous” “”
“m” “0” “c” “white” “” “lt” “continuous” “” “”)
(if (and (/= ulay1 nil) (= solide “2”))
(progn (setq olay1 (ssget “X” (list (cons 6 “CONTINUOUS”))))
(if (/= olay1 nil)
(command “change” olay1 “” “p” “la” “s” “color” “BYLAYER” “lt” “bylayer” “”)) ))
(setq olay1 nil)
(if (and (/= ulay2 nil) (= dashed “2”))
(progn (setq olay2 (ssget “X” (list (cons 6 “dashed”))))
(if (/= olay2 nil)
(command “change” olay2 “” “p” “la” “h” “color” “BYLAYER” “lt” “bylayer” “”)) ))
(setq olay2 nil)
(if (and (/= ulay3 nil) (= phantome “2”))
(progn (setq olay3 (ssget “X” (list (cons 6 “PHANTOM”))))
(if (/= olay3 nil)
(command “change” olay3 “” “p” “la” “p” “color” “BYLAYER” “lt” “bylayer” “”)) ))
(setq olay3 nil)
(if (and (/= ulay4 nil) (= center “2”))
(progn (setq olay4 (ssget “X” (list (cons 6 “center”))))
(if (/= olay4 nil)
(command “change” olay4 “” “p” “la” “c” “color” “BYLAYER” “lt” “bylayer” “”)) ))
(setq olay4 nil)
(command “layer” “m” “s” “c” “green” “” “lt” “continuous” “”
“m” “h” “c” “yellow” “” “lt” “dashed” “”
“m” “c” “c” “magenta” “” “lt” “center” “”
“m” “p” “c” “cyan” “” “lt” “phantom” “”
“m” “r” “c” “red” “” “lt” “continuous” “”
“m” “n” “c” “green” “” “lt” “continuous” “”
“m” “0” “c” “white” “” “lt” “continuous” “” “”)
(setq sser (tblsearch “style” “gsgul”))
(if (= sser nil) (command “style” “gsgul” “gsgul” “” “” “” “” “” “”))
(setq sser (tblsearch “style” “SI”))
(if (= sser nil) (command “style” “SI” “SIMPLEX” “” “” “” “” “” “”))
(setq sser (tblsearch “style” “CO”))
(if (= sser nil) (command “style” “CO” “COMPLEX” “” “” “” “” “” “”))
(setq sser (tblsearch “style” “IT”))
(if (= sser nil) (command “style” “IT” “ITALIC” “” “” “” “” “” “”))
(setq sser (tblsearch “style” “MDH”))
(if (= sser nil) (command “style” “MDH” “HANGUL” “” “” “” “” “” “”))
(setvar “cmdecho” 1) (print)
)