0 Members and 1 Guest are viewing this topic.
NO, the application is excluded.not only the whole dcl code,but also the initialized dcl lisp source code is generated by program, automatically.The above lisp code & dcl code you can download, are all written by the program, no letter by me.
Hello everyone !nonsmall works: Visual DCL dialog box automatically connect program.The program written entirely by AutoLisp. TKS
This was out a little while back on Cadalyst (I think). It's a paid program, It never really took off. (Imo)Here is a link to it on freecadappsHere it is on CaddepotIt seems there website is MIA
(defun VB-DCL(export_mode view_code view_form frm_path dcl_path lsp_path / ; *h_scale *w_scale add_num all_list be control dcl_id del dialog_all dialog_h ; dialog_info dialog_key dialog_label dialog_w dialog_x dialog_y end end_string ; err_value f file frame_h frame_key frame_label frame_typ frame_w frame_x frame_y ; get get_be get_end go h i info is_cancel key key_word label layout lst lst_left ; lst_new_column lst_new_row max_range maxh maxw minx minx_info miny miny_info n ; old_range other path re return s sort_lst space str tmp typ w x y ) (setq path "D:\\Lisp_开发研究\\visual DCL\\") (setq f (open frm_path "r")) (setq key_All nil ok_cancel nil Sort_Times 0) (setq *w_scale 100.0 *h_scale 200.0) (read-line f) (setq dialog_key (last (non_string_to_list (vl-string-trim " " (read-line f)) " "))) (setq dialog_label (GetLast (read-line f))) (setq dialog_H (/ (read (GetLast (read-line f))) *h_scale)) (setq dialog_X (/ (read (GetLast (read-line f))) *w_scale)) (setq dialog_Y (/ (read (GetLast (read-line f))) *h_scale)) (setq dialog_W (/ (read (GetLast (read-line f))) *w_scale)) (setq dialog_info (list dialog_X dialog_Y dialog_W dialog_H dialog_key dialog_label)) (while (not (vl-string-search "Begin" (setq str (read-line f))))) (setq go 1 All_list nil dialog_all nil label "" other nil) (while (/= go 0) (cond ((= "End" (vl-string-trim " " str)) (setq go (1- go)) (if (= 1 go) (setq dialog_all (append dialog_all (list (list x y w h key label typ other))) label "" other nil) ) ) ((vl-string-search "Begin VB.Frame" str) (setq dialog_all (append dialog_all (list (OpenFrame str))) label "" other nil) ) ((vl-string-search "Begin VB." str) (setq go (1+ go)) (setq key (last (setq tmp (non_string_to_list (vl-string-trim " " str) " ")))) (setq typ (last (non_string_to_list (cadr tmp) "."))) ) ((or (= "Tag" (GetFirst str)) (= "Caption" (GetFirst str)) (= "Text" (GetFirst str))) (setq label (GetLast str)) ) ((= "Height" (GetFirst str)) (setq h (/ (read (GetLast str)) *h_scale)) ) ((= "Width" (GetFirst str)) (setq w (/ (read (GetLast str)) *w_scale)) ) ((= "Left" (GetFirst str)) (setq x (/ (read (GetLast str)) *w_scale)) ) ((= "Top" (GetFirst str)) (setq y (/ (read (GetLast str)) *h_scale)) ) ((= "MultiSelect" (GetFirst str)) (setq other (GetLast str)) ) ) (setq str (read-line f)) ) (close f) (setq sort_lst (sort_with_column "COLUMN" dialog_all));排出来Row+控件表+控件表 +.... (setq Space 4 Add_Num 0);增加空格Space 增加次数Add_Num (setq get (Broken sort_lst));得到前后两段源码 (setq End_String (append (car get) (cadr get))) (if (not ok_cancel) (setq key_All (append key_All (list (list "accept" "button" "确认") (list "cancel" "button" "取消"))))) (cond ((= export_mode "unite") (write_Dcl_in_Lsp lsp_path frm_path) (if (= view_code "1")(startapp "notepad" lsp_path)) ) ((= export_mode "alone") (write_dcl_only dcl_path frm_path) (write_lsp_only lsp_path dcl_path) (if (= view_code "1")(startapp "notepad" dcl_path)) (if (= view_code "1")(startapp "notepad" lsp_path)) ) ((= export_mode 3) (write_dcl_only dcl_path) (write_lsp_Net lsp_path) ) ) (if (= view_form "1") (progn (load lsp_path) (c:tt) ) ))
(defun c:q( / dcl_id Dialog_Return key keys Dcl_File) (setq reg_path "HKEY_LOCAL_MACHINE\\SOFTWARE\\Autodesk\\VB-Dcl") (setq dcl_id (load_dialog (setq Dcl_File (Write_VB_Dcl))));对话框加载 (vl-file-delete Dcl_File) (setq keys '("frm_path" "frm_sel" "dcl_path" "dcl_sel" "lsp_path" "lsp_sel" "unite" "alone" "view" "code" "accept" "cancel" "info"));列表全部控件名称 (foreach key keys (set (read (strcat key "_bak")) (vl-registry-read reg_path (strcat key "_bak"))) ) (setq Dialog_Return 2) (while (> Dialog_Return 0) ;循环控制对话框是否结束 (new_dialog "Form1" dcl_id);建立窗体;-->-->-对话框初始化->-->-- (foreach key keys;全部控件的初始化 (if (eval (read (strcat key "_bak"))) (set_tile key (eval (read (strcat key "_bak")))));控件内容 (action_tile key "(Action_Form_Keys $key $value)");点击动作 );--<--<-对话框初始化完成-<--<-- (setq Dialog_Return (start_dialog));开启对话框(用户可见) ) (unload_dialog dcl_id);退出时卸载对话框 (princ);防止函数回显)(defun Action_Form_Keys (key value) ;全部控件的点击动作触发 (cond ((= key "accept") ;{确认按钮} (foreach key '("frm_path" "dcl_path" "lsp_path") (set (read key) (get_tile key)) ) (foreach key '("unite" "alone" "dcl" "all") (if (= (get_tile key) "1") (setq export_mode key) ) ) (setq view_code (get_tile "code")) (setq view_form (get_tile "view")) (Get_Form_Date) (VB-DCL export_mode view_code view_form frm_path dcl_path lsp_path) ) ((= key "cancel") ;{取消按钮} (done_dialog 0);对话框退出返回主函数 传递给Dialog_Return独立0 ) ((= key "frm_sel") ; {"选择"} (按钮) (if (vl-file-directory-p (vl-filename-directory (get_tile "frm_path"))) (setq old_path (strcat (vl-filename-directory (get_tile "frm_path")) "\\")) (setq old_path "") ) (if (setq path (getfiled "请选择需要转换的Frm文件" old_path "frm" 0)) (set_tile "frm_path" path) ) ) ((= key "dcl_sel") ; {"选择"} (按钮) (if (vl-file-directory-p (vl-filename-directory (get_tile "dcl_path"))) (setq old_path (strcat (vl-filename-directory (get_tile "dcl_path")) "\\")) (setq old_path "") ) (if (setq path (getfiled "请确认转换后保存的Dcl文件名" old_path "dcl" 1)) (set_tile "dcl_path" path) ) ) ((= key "lsp_sel") ; {"选择"} (按钮) (if (vl-file-directory-p (vl-filename-directory (get_tile "lsp_path"))) (setq old_path (strcat (vl-filename-directory (get_tile "lsp_path")) "\\")) (setq old_path "") ) (if (setq path (getfiled "请确认转换后保存的Lsp文件名" old_path "lsp" 1)) (set_tile "lsp_path" path) ) ) ((= key "info") ; {"说明"} (按钮) (alert (strcat "程序作者: nonsmall \n" "联系方式: QQ43797405 \n" "Email : nonsmall@163.com" ) ) ) ))(defun Get_Form_Date( / key) (foreach key keys (vl-registry-write reg_path (strcat key "_bak") (get_tile key)) ))(defun Write_VB_Dcl( / Dcl_File file str) (setq Dcl_File (vl-filename-mktemp nil nil ".Dcl")) (setq file (open Dcl_File "w")) (foreach str '( "/*nonsmall 作品: Visual DCL*/" "//本代码全部由Visual DCL程序自动生成" "" "Form1:dialog" "{" " label = \"Visual Dcl 全自动制作程序 V1.0\";" " :column" " {" " :boxed_column" " {" " key = \"Frame1\" ;" " label = \"路径选择\" ;" " :row" " {" " :edit_box" " {" " key = \"frm_path\" ;" " label = \"Frm窗体路径:\" ;" " width = 76.95 ;" " height = 0.9375 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :button" " {" " key = \"frm_sel\" ;" " label = \"选择\" ;" " width = 9.75 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " }" " :row" " {" " :edit_box" " {" " key = \"dcl_path\" ;" " label = \"输出DcL路径:\" ;" " width = 76.95 ;" " height = 0.9375 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :button" " {" " key = \"dcl_sel\" ;" " label = \"选择\" ;" " width = 9.75 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " }" " :row" " {" " :edit_box" " {" " key = \"lsp_path\" ;" " label = \"输出Lsp路径:\" ;" " width = 76.95 ;" " height = 0.9375 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :button" " {" " key = \"lsp_sel\" ;" " label = \"选择\" ;" " width = 9.75 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " }" " }" " :boxed_column" " {" " key = \"Frame2\" ;" " label = \"输出文件类型选择\" ;" " :row" " {" " :radio_button" " {" " key = \"unite\" ;" " label = \"Dcl+Lsp整合\" ;" " width = 13.35 ;" " height = 1.275 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :radio_button" " {" " key = \"alone\" ;" " label = \"Dcl+Lsp独立文件\" ;" " width = 16.95 ;" " height = 1.275 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :toggle" " {" " key = \"view\" ;" " label = \"完成后预览窗体\" ;" " width = 15.75 ;" " height = 1.275 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :toggle" " {" " key = \"code\" ;" " label = \"完成后查看源码\" ;" " width = 15.75 ;" " height = 1.275 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " }" " }" " :row" " {" " :text" " {" " key = \"Label1\" ;" " width = 13.35 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :button" " {" " key = \"accept\" ;" " label = \"Just Do It !\" ;" " width = 19.35 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " is_default = true ;" " }" " :button" " {" " key = \"cancel\" ;" " label = \"退出\" ;" " width = 16.95 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " is_cancel = true ;" " }" " :button" " {" " key = \"info\" ;" " label = \"说明\" ;" " width = 16.95 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " :text" " {" " key = \"Label2\" ;" " width = 15.75 ;" " height = 1.875 ;" " fixed_height = true ;" " fixed_width = true ;" " }" " }" " }" "}" ) (write-line str file)) (close file) Dcl_File)
error: no function definition: NON_STRING_TO_LIST