foer123 发表于 2020-1-15 18:21:14

求助 各位大神

vv:dialog{label="图片";
:row{:image_button{key="nmkih";color=-2;width=8;aspect_ratio=1;allow_accept=true;}
}spacer_1; ok_cancel;}

求助 各位大神 上面是DCL文件   把它和LSP文件 写在一个文件里面该怎么写代码      帮写一个 谢谢大神门

Bao_lai 发表于 2020-1-15 19:11:16

关键字:DCL转LISP

烟盒迷唇 发表于 2020-1-20 11:19:25

论坛里搜索就有了啊

香远益清 发表于 2020-1-20 12:41:49

(defun tupianl(/ lst_str str file f)
                (setq lst_str '(
"vv:dialog{label=\"图片\";"
":row{:image_button{key=\"nmkih\";color=-2;width=8;aspect_ratio=1;allow_accept=true;}"
"}spacer_1; ok_cancel;}"
                  )
    )
    (setq file (vl-filename-mktemp "DclTemp.dcl"))
    (setq f (open file "w"))
    (foreach str lst_str
        (princ "\n" f)
        (princ str f)
    )
    (close f)
    ;;返回
    file
)

注意将原LISP主程序中的 (load_dialog “*.Dcl“)改为(load_dialog tupian))即可运行了。

香远益清 发表于 2020-1-20 12:42:43


(defun tupian (/ lst_str str file f)

香远益清 发表于 2020-1-20 12:43:09

不小心多了个字符
页: [1]
查看完整版本: 求助 各位大神