明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1532|回复: 2

无法正常运行的lisp

[复制链接]
发表于 2005-3-14 14:49 | 显示全部楼层 |阅读模式
无法正常运行 (defun c:fixt (/ ss idx txtent newstr k)
(setq
fx_pre (if fx_pre fx_pre "")
fx_pos (if fx_pos fx_pos "")
)
(princ (strcat "\n前缀: '" fx_pre "'\t后缀: '" fx_pos "'"))
(initget "O S")
(setq
k (getkword "\nO选项/: ")
k (if k k "S")
)
(if
(= k "O")
(setq
fx_pre (getstring 1 "\n前缀: ")
fx_pos (getstring 1 "\n后缀: ")
)
)
(setq ss (ssget '((0 . "text"))) idx 0)
(if ss
(repeat (sslength ss)
(setq
txtent (entget (ssname ss idx))
newstr (strcat fx_pre (cdr (assoc 1 txtent)) fx_pos)
)
(entmod (subst (cons 1 newstr) (assoc 1 txtent) txtent))
(setq idx (1+ idx))
)
)
(princ)
)
发表于 2005-3-14 15:43 | 显示全部楼层
我运行了,并没有出现问题
发表于 2005-3-14 22:19 | 显示全部楼层
我运行了,也没有出现问题


很不错
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-19 04:06 , Processed in 0.248458 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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