麻烦哪位大声帮我增加一个粘贴的代码啊,谢谢
(defun c:qrr()(command "text" pause "350" "0" )
)
想直接加一个ctrl+v的效果,麻烦了,直接运行命令就可以把剪贴板的内容写出来
要善于使用搜索功能。(defun c:11 (/ get-clip-string)
(defun get-clip-string (/ html result)
(and (setq html (vlax-create-object "htmlfile"))
(setq result (vlax-invoke
(vlax-get (vlax-get HTML 'PARENTWINDOW)
'CLIPBOARDDATA
)
'GETDATA
"Text"
)
)
(vlax-release-object html)
)
result
)
(command "text" pause "350" "0" (get-clip-string))
(princ)
)
qazxswk 发表于 2024-7-18 17:47
要善于使用搜索功能。
谢谢,我没收到:'(才来发帖的 qazxswk 发表于 2024-7-18 17:47
要善于使用搜索功能。
能不能增加个判断条件,检测到在模型空间时粘贴的字高为350,检测到在布局空间时粘贴字高为3.5 蓦然语嫣 发表于 2024-7-19 14:38
能不能增加个判断条件,检测到在模型空间时粘贴的字高为350,检测到在布局空间时粘贴字高为3.5(defun c:11 (/ get-clip-string)
(defun get-clip-string (/ html result)
(and (setq html (vlax-create-object "htmlfile"))
(setq result (vlax-invoke
(vlax-get (vlax-get HTML 'PARENTWINDOW)
'CLIPBOARDDATA
)
'GETDATA
"Text"
)
)
(vlax-release-object html)
)
result
)
(if
(= (getvar "TILEMODE") 1)
(command "text" pause "350" "0" (get-clip-string))
(command "text" pause "3.5" "0" (get-clip-string))
)
(princ))
qazxswk 发表于 2024-7-19 16:59
谢谢分享 qazxswk 发表于 2024-7-19 16:59
能不能改为在粘贴之前,先输入字高 蓦然语嫣 发表于 2024-7-21 15:05
能不能改为在粘贴之前,先输入字高
(defun c:11 (/ get-clip-string zhigao)
(defun get-clip-string (/ html result)
(and (setq html (vlax-create-object "htmlfile"))
(setq result (vlax-invoke
(vlax-get (vlax-get HTML 'PARENTWINDOW)
'CLIPBOARDDATA
)
'GETDATA
"Text"
)
)
(vlax-release-object html)
)
result
)
(setq zhigao (getreal"\n请输入文字高度:"))
(command "text" pause zhigao "0" (get-clip-string))
(princ))
qazxswk 发表于 2024-7-21 20:35
(defun c:11 (/ get-clip-string zhigao)
(defun get-clip-string (/ html result)
(and (setq htm ...
谢谢分享,这下完善了
页:
[1]