oysheji 发表于 2025-1-21 22:35:43

里面的快速打印不行,出现错误 了
; 错误: Automation 错误。 输入无效
命令:
命令:
命令: (LOAD "C:/Users/Administrator/Desktop/mytool 2024.06.30/快速打印设置mkprint(独立版本)/将此文件拖入ACAD绘图区安装.lsp")
C:/Users/Administrator/Desktop/mytool 2024.06.30/快速打印设置mkprint(独立版本)/将此文件拖入ACAD绘图区安装.lsp
命令行输入 ps 启动打印设置!
命令: PS
; 错误: Automation 错误。 输入无效
命令:
命令: PS
; 错误: Automation 错误。 输入无效
命令:
命令: 指定对角点或 [栏选(F)/圈围(WP)/圈交(CP)]:

nuan1989 发表于 2025-1-23 11:55:37

2007, 不好使, no function definition: _VLA-init

nuan1989 发表于 2025-1-23 15:09:47

大哥... 你用list作为参数命名, 折腾s我了. ...
高版本可以, 2007死活不行. 后面发现你用关键字做参数名称

puzb2023 发表于 2025-1-25 20:29:37

谢谢分享,实用的工具

zhangrunze 发表于 2025-3-3 10:19:26

感谢分享 晚点试试新版本的CAD,看看兼容性怎么样~

zhangrunze 发表于 2025-3-6 13:52:00

Win10+2024版本测试通过~

zhangrunze 发表于 2025-3-8 10:46:46

文字编辑时,可以加入文字中英文数量识别的功能吗?



当中文文字数量多的时候切换为中文输入法
当英文文字数量多的时候切换为英文输入法

网上看见的代码,也不懂搞~

(defun c:SmartSwitchIME (/ GetTextContent AnalyzeTextRatio)
;; 获取当前编辑的文本内容
(defun GetTextContent ()
    (if (setq ent (car (entsel)))
      (vla-get-textstring (vlax-ename->vla-object ent))
      ""
    )
)

;; 中英文字符比例分析
(defun AnalyzeTextRatio (str)
    (setq chn_cnt (length (vl-remove-if-not '(lambda (x) (wcmatch (chr x) "[一-龥]")) (vl-string->list str))))
    (setq eng_cnt (- (strlen str) chn_cnt))
    (if (> chn_cnt eng_cnt) 1 0)
)

;; 命令监听逻辑
(defun OnCommandEnded (cmd)
    (if (wcmatch cmd "MTEXT*,TEXT*,DDEDIT*")
      (progn
      (setq txt (GetTextContent))
      (if (= (AnalyzeTextRatio txt) 1)
          (command "_IMESetStatus" 1) ;中文输入法‌:ml-citation{ref="5" data="citationList"}
          (command "_IMESetStatus" 0) ;英文输入法‌:ml-citation{ref="5" data="citationList"}
      )
      )
    )
)

(vlr-command-reactor nil '((:vlr-commandended . OnCommandEnded)))
(princ "\n智能输入法切换已启用。")
)


ikumamon 发表于 2025-3-14 10:16:14

感谢大佬,2025版本正常运行!!

zhangrunze 发表于 2025-3-20 09:35:50


兼容性不错,WIN10+CAD2025测试通过;


zzj_mj 发表于 2025-3-27 16:35:31

试试如何,,,,,,,,
页: 2 3 4 5 6 7 8 9 10 11 [12] 13
查看完整版本: 【输入法自动切换】&【鼠标双击管理器】&【快速打印设置】 源码