明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1499|回复: 1

一个arx和一个lsp不兼容,如何解决?搞半天头大了

[复制链接]
发表于 2005-2-16 22:49:00 | 显示全部楼层 |阅读模式
我加载了一个arx,作用是执行text命令时候自动切换到“标注”层,完后切换回原来的层,(也就是用text写的字都会自动放到“标注”层去),然后加载了下面插入系统日期的lsp,这lsp用起来就出错,单独正常的,下面图片上红线就是arx在自动切换层 (defun c:rq (/ tmp cy cm cd hh mm ss ms txt pt1)
(setq tmp (rtos (getvar "cdate") 2 16))
(setq cy (rtos (atof (substr tmp 1 4)) 2 0)
cm (rtos (atof (substr tmp 5 2)) 2 0)
cd (rtos (atof (substr tmp 7 2)) 2 0)
hh (rtos (atof (substr tmp 10 2)) 2 0)
mm (rtos (atof (substr tmp 12 2)) 2 0)
ss (rtos (atof (substr tmp 14 2)) 2 0)
ms(rtos (atof (substr tmp 16 2)) 2 0)
)
(setq txt (strcat "现在是:" cy "年"cm "月" cd "日" hh"时" mm "分" ss "秒" ms "毫秒"))
(setq pt1 (getpoint "\n\t放置点 : "))
(command "text" "j" "BL" pt1 "" "" txt)
(princ)
)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2005-2-17 07:29:00 | 显示全部楼层
程序开始用 getvar 取当前层并保存,在 text 之前 setvar 设置图层,text 命令后再次用 setvar 返回原图层。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-29 18:22 , Processed in 0.190775 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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