Dear all,
I have a question to ask you, thanks in advanced.
There are two list,the list1 is(ttt : dialog (label "text sample" (: edit_box (key "a1" label "text1:"))
(: edit_box (key "a2" label "text2:")) (: edit_box
(key "a3"
label "text3:"
)
) (: edit_box
(key "a4"
label "text4:"
)
)
) ok_cancel
)
and list2 is("TTT : dialog {"
"label = \"text sample\";"
": edit_box { key = \"a1\"; label = \"text1:\"; }"
": edit_box { key = \"a2\"; label = \"text2:\"; }"
": edit_box { key = \"a3\"; label = \"text3:\"; }"
": edit_box { key = \"a4\"; label = \"text4:\"; }"
"ok_cancel;"
"}")
How to change list1 to list2?
There is a function:(defun th-dcl-creat (lst / acadfn fn)
(setq acadfn (findfile "ACAD.PAT")
fn (strcat (substr acadfn 1 (- (strlen acadfn) 8)) "temp.dcl")
fn (open fn "w")
)
(foreach x lst
(princ x fn)
(write-line "" fn)
)
(close fn)
(princ)
)
(th-dcl-creat list2) will creat a dcl file,any one can help me? tks!