Author Topic: how to change list1 to list1?  (Read 1810 times)

0 Members and 1 Guest are viewing this topic.

taner

  • Guest
how to change list1 to list1?
« on: June 19, 2008, 08:09:23 AM »
Dear all,

I have a question to ask you, thanks in advanced.

There are two list,the list1 is
Code: [Select]
(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
Code: [Select]
("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:
Code: [Select]
(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!
« Last Edit: June 19, 2008, 08:13:56 AM by taner »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

taner

  • Guest
Re: how to change list1 to list1?
« Reply #2 on: June 19, 2008, 08:48:43 AM »
Dear CAB,

Thanks very much!