明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1444|回复: 1

如何解决只有视口没有其他图案才能绘出图形

[复制链接]
发表于 2012-3-22 14:47:38 | 显示全部楼层 |阅读模式
(defun c:pin ()
(setq *error* nil)
(command "layer" "s" "0" "" )
( setvar "cmdecho" 1 )
( setvar "highlight" 1)
(command "UCS" "" )
(setq p1 (getpoint "第一点:"))
(setq p2 "@-0.55,0")
(setq p3 "@-0.15,-0.1")
(setq p4 "@-0.1,-0.15")
(setq p5 "@0.25,-0.95")
(setq p6 "@-0.25,-0.5")
(setq p7 "@-0.25,0.15")
(setq p8 "@0.2,0.4")
(setq p9 "@-0.25,0.9")
(setq p10 "@0.17,0.4")
(setq p11 "@0.3,0.15")
(setq p12 "@8.18,0")
(setq p13 "@0,-0.3")
(setq p14 "@-6.55,0")
(setq p15 "@0.1,-0.25")
(setq p16 "@-0.25,-0.9")
(setq p17 "@0.2,-0.4")
(setq p18 "@-0.25,-0.15")
(setq p19 "@-0.25,0.5")
(setq p20 "@0.25,0.95")
(setq p21 "@-0.1,0.15")
(setq p22 "@-0.15,0.1")
(command "pline" p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p1 ""))
发表于 2012-7-30 21:37:25 | 显示全部楼层
本帖最后由 xsso 于 2012-7-30 21:38 编辑

没有关捕捉点,对于画图程序最好把捕捉点关了
应该在程序开端
(setq os (getvar "osmode"))
(setvar "osmode" 0)

结尾处
(setvar "osmode" os)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-18 15:28 , Processed in 0.176523 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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