明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1432|回复: 2

一个修改标注的程序,放大倍数可以,缩小却不行

[复制链接]
发表于 2005-3-14 20:15:00 | 显示全部楼层 |阅读模式
比如缩小0.5倍就不行,可以改么?能改就把改好的代码贴一遍,谢谢 (defun C:test()
(prompt "\nSelect Dimension: ")
(setq SS (ssget '((0 . "DIMENSION")))
I 0
)
(if (= KEY NIL)
(setq KEY "Default")
)
(initget "Scale Input Default")
(setq KEY0
(getkword (strcat "\nPlease select option[Scale/Input/Default]<"
KEY
">:"
)
)
)
(if (/= KEY0 NIL)
(setq KEY KEY0)
)
(cond ((= KEY "Scale") (setq SCALE (getint "\ninput the scale:")))
((= KEY "Input") (setq TXT (getstring "\ninput the new txt:")))
)
(repeat (sslength SS)
(setq DIM (entget (ssname SS I))
AA (cdr (assoc 42 DIM))
BB (cdr (assoc 1 DIM))
)
(cond ((= KEY "Scale") (setq NEWTXT (rtos (* AA SCALE))))
((= KEY "Input") (setq NEWTXT TXT))
((= KEY "Default") (setq NEWTXT "<>"))
)
(entmod (subst (cons 1 NEWTXT) (assoc 1 DIM) DIM))
(setq I (1+ I))
)
)
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2005-3-15 06:25:00 | 显示全部楼层
(setq SCALE (getint "\ninput the scale:"))改为


(setq SCALE (getreal "\ninput the scale:"))
 楼主| 发表于 2005-3-15 12:12:00 | 显示全部楼层
谢谢,可以用了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-28 00:39 , Processed in 0.163015 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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