明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: luowy

[讨论]绘制多条线段

[复制链接]
 楼主| 发表于 2008-10-20 14:43:00 | 显示全部楼层

(defun c:aaa()
(command "_mline" "st" "3气" "pause")
 
(while (= (logand (getvar "CmdActive") 1) 1) (command pause))
(command "explode" (entlast) "")
  (setq ll (cons 8 "0")
 yl (cons 8 "1")
 ysl (cons 8 "2")
 zkl (cons 8 "3")
 ;ol (cons 62 1)
 )
  (setq ss (ssget "p"))  ;获得选集
 
  (setq n 0)
    (repeat (sslength ss)
    (setq ents (entget (ssname ss n))
          pp (cdr (assoc 62 ents)))
     (cond
 ((= pp '1)  (entmod (subst yl ll ents)))
 ((= pp '6)  (entmod (subst zkl ll ents)))
 ((= pp '230)  (entmod (subst ysl ll ents)))
      )
      ;(entmod ents)
      (setq n (1+ n))
    
      );repeat
  )

(defun *error* (msg)
  (princ "Failure at:")
  (princ msg)
  (princ))

如上可以解决问题,谢谢各位的帮助~~

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

本版积分规则

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

GMT+8, 2025-6-18 13:22 , Processed in 0.161331 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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