明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1364|回复: 0

[LISP]在点取点之前先看到将要出现的图形的形状

[复制链接]
发表于 2003-12-22 00:21 | 显示全部楼层 |阅读模式
如何在下代码中,在点取点之前先看到将要出现的图形的形状,这样可以确定其位置,保证不会与其它图形重叠。如果可以的话能否帮我修改一下。谢谢!
CODE](defun C:BJ()
    (print "\n选择标注意颜色:")

; (command "FONTALT" "隶书")
    (command "CECOLOR" (acad_colordlg  6))
    (setq old_rr (getvar "circlerad"))
    (setq str_rr (strcat "\n圆半径<" (rtos old_rr 2) ">:"))

    (setq rr1 (getdist str_rr))
    (if (null rr1) (setq rr1 old_rr))
    (setq num (getint "\n起始值<1>:"))
    (if (= num nill) (setq num 1))
    (setq pt (getpoint "\n 插入点:"))

    (while pt
          (setq cen pt)
(setq ss (ssadd))
        (command "circle" cen (* rr1 1.05))
(setq ss (ssadd (entlast)))
        (command "circle" cen  rr1)
          (setq ss (ssadd (entlast) ss))
          (command "_hatch" "solid" ss "")
(command "-style" "new" "隶书" (* rr1 0.8) "1" "0" "n" "n")
        (command "text" "m" cen  "0" (itoa num))
          (setq num (1+ num))
          (setq pt (getpoint pt "\n下一个插入点"))
    )
    (ptinl)
)[[/CODE]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-3 06:10 , Processed in 0.196425 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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