明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1144|回复: 3

[提问] 请教lsp执行后显示"引数太多"

[复制链接]
发表于 2020-5-1 06:53:33 | 显示全部楼层 |阅读模式
请教lsp执行后显示"引数太多"
我参考网友写的lsp,然后要套用在2016版本的cad中
当我执行后显示"引数太多"的错误讯息,请问是否哪里有错呢?

(defun c:ChgAllStylesToCht()
(defun myerr(m)
(setq *error* olderr)
(princ m)
)
(setq olderr *error* *error* myerr)
(initget 1 “y n")
(if (= “n" (getkword “\n 本程式為從Inventor工程圖轉檔至AutoCAD dwg檔之後,字型轉換需求而設計\n 本程式將對本圖檔之所有字型字體檔更改為romans+chineset,確定執行? <y/n> “))
(exit)
)
(setq stylst  (list))
(setq stydata (tblnext “style" t)
styname (cdr (assoc 2 stydata))
stylst  (append (list styname) stylst)
)
(while (setq stydata (tblnext “style"))
(setq styname (cdr (assoc 2 stydata))
stylst  (append (list styname) stylst)
)
)
(setq n 0)
(repeat (length stylst)
(chgstyletocht (nth n stylst))
(setq n (+ 1 n))
)
(alert “*** 作業完成 ***")
(setq *error* olderr)
(princ)
)
;—– 程式用到的函式: chgstyletocht() (subrutine program)–
(defun chgstyletocht(stname)
(if (tblsearch “style" stname)
(progn
(command “-style" stname “romans.shx,chineset.shx" 0 1 0 “n" “n" “n")
)
(princ c)
)
)
(princ)
;;

"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2020-5-1 07:49:27 | 显示全部楼层
服了你了,双引号怎么能用中文的呢?
发表于 2020-5-1 22:42:10 | 显示全部楼层
楼上正解,引号问题,还不只一个,你家电脑输入法不太听话啊
 楼主| 发表于 2020-5-4 10:02:38 | 显示全部楼层
烟盒迷唇 发表于 2020-5-1 07:49
服了你了,双引号怎么能用中文的呢?

了解,謝謝您提醒
我再試著修改看看!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-5-18 05:28 , Processed in 0.182512 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表