查看单个帖子
旧 2009-04-26, 12:50 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 [求助]如何批量旋转实体为水平

[求助]如何批量旋转实体为水平
www.dimcax.com
[求助]如何批量旋转实体为水平
如何批量旋转实体为水平,求教
d
顶一下
d
什么实体?
踅摸
d
(defun c:rx(/ bs bn ts nl index bn c bp pt)在wcs中恢复水平
(command "undo" "group")
   (setq bs(ssget))
   (setq nl(sslength bs))
   (setq index 0)
   (repeat nl
      (setq bn(ssname bs index))
      (setq bd(entget bn))
      (setq c(assoc 10 bd))
(setq r0 (cdr (assoc 50 bd)))
(setq r0 (* (/ 180.0 pi) r0))
(setq r0 (- 360 r0))
      (setq pt (cdr c))
      (command "_rotate" bn "" pt r0)
      (setq index (+ index 1))
   )
   (setq bs nil)
(command "undo" "end")
)
d
谢谢四楼的程序,未测试,不知对一些多段线和横七竖八的矩形之类有没有效果,
谢谢zzxxqq,我指的实体是"一些多段线和横七竖八的矩形"
d
有50的群码的是什么实体啊
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)