linwanglian 发表于 2022-8-2 16:05:45

lisp编译成VLX后,原设定命令不能用

本帖最后由 linwanglian 于 2022-8-3 08:38 编辑

这2个文件,编译成VLX,输入JLTC,就提示未知命令,刚开始学LISP,搞不明白了。请前辈们帮忙看看咋回事!!!

自贡黄明儒 发表于 2022-8-2 16:50:47

估计是对话框加载路径不对。

linwanglian 发表于 2022-8-2 18:13:20

自贡黄明儒 发表于 2022-8-2 16:50
估计是对话框加载路径不对。

单独编译LISP也不好用

wzg356 发表于 2022-8-2 21:55:12

可能是编译有问题,没加载完

linwanglian 发表于 2022-8-3 08:39:21

wzg356 发表于 2022-8-2 21:55
可能是编译有问题,没加载完

我安装个原版CAD试试吧,我怀疑精简版的可能不行。

xudongchu 发表于 2022-8-3 14:49:10

2006 2012已测试编译后加载没有问题,可以使用。

linwanglian 发表于 2022-8-3 17:25:55

xudongchu 发表于 2022-8-3 14:49
2006 2012已测试编译后加载没有问题,可以使用。

谢谢,我用的2021,编译完成以后,一直是未知命令。我再装个2006吧,非常感谢!

wharan 发表于 2022-8-3 19:12:28

这个问题确实存在。有时候一个不合适的中文文件名,编译后也会找不到命令。

hhh454 发表于 2022-8-4 01:03:27

;对话框程序开始:
(defun ngc-dcl()
(setq Dcl_File (vl-filename-mktemp nil nil ".Dcl"))
(setq f_dcl (open Dcl_File "w"))
(write-line "JLTC:dialog{" f_dcl)
(write-line "         label=\"立弘-图层设定\";" f_dcl)
(write-line "         :boxed_radio_column{" f_dcl)
(write-line "                           label=\"新建图层\";" f_dcl)
(write-line "                           :radio_button{label=\"安装图层\";key=\"rb11\";}" f_dcl)
(write-line "                           :radio_button{label=\"加工图层\";key=\"rb12\";}" f_dcl)
(write-line "                           :radio_button{label=\"深化图层\";key=\"rb13\";}" f_dcl)
(write-line "                           }" f_dcl)
(write-line "          spacer_1;" f_dcl)
(write-line "          ok_cancel;" f_dcl)
(write-line "         }" f_dcl)
(close f_dcl)Dcl_File)
;;主程序开始:
(defun        c:tt ()
   (setq dcl_id (load_dialog (setq Dcl_File (ngc-dcl))))
   (vl-file-delete Dcl_File)
   (SETQ CHK 0)
   (NEW_DIALOG "JLTC" DCL_ID)
   (ACTION_TILE "accept" "(SETQ CHK 1)(S_PGON)(DONE_DIALOG)")
   (START_DIALOG)
   (UNLOAD_DIALOG DCL_ID)
   (cond ((= dd 1) (sub_achk_layer))
       ((= dd 2) (sub_jchk_layer))
       ((= dd 3) (sub_schk_layer))
   )
   (PRINC)
)
(DEFUN        S_PGON ()
   (COND ((= (GET_TILE "rb11") "1") (SETQ dd 1))
       ((= (GET_TILE "rb12") "1") (SETQ dd 2))
       ((= (GET_TILE "rb13") "1") (SETQ dd 3))
   )
)
(defun        sub_achk_layer ()
   (alert "\n001")
)
(defun        sub_jchk_layer ()
   (alert "\n002")
)
(defun        sub_schk_layer ()
   (alert "\n003")
)


测试后能识别启动命令,自己替换自定义函数部分,我换了触发条件,可以参考

linwanglian 发表于 2022-8-23 19:13:52

hhh454 发表于 2022-8-4 01:03
测试后能识别启动命令,自己替换自定义函数部分,我换了触发条件,可以参考

非常感谢,我再试试。
页: [1]
查看完整版本: lisp编译成VLX后,原设定命令不能用