明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 435|回复: 2

[提问] 各位老师,我想批量生成折线的外框,运行时部分图纸外框范围有误,求指点

[复制链接]
发表于 2020-3-21 11:36 | 显示全部楼层 |阅读模式
各位老师,我想批量生成折线的外框,运行时部分图纸外框范围有误,求指点

本帖子中包含更多资源

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

x
发表于 2020-3-21 15:08 | 显示全部楼层
(defun C:test ()
  (vl-load-com)
  (command "undo" "be")
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)
  (command "ucs" "w")
  (princ "\n请选择折线:")
  (while (null
           (setq EN
             (ssget
               '((70 . 0)
                 (90 . 3)
                 (0 . "LWPOLYLINE")
                )
             )
           )
         )
  )
  (setq i 0)
  (while (setq ee (ssname en i))
    (apply
     'vl-cmdf (cons ".Rectangle" (acet-ent-geomextents ee))
    )
    ;; (vl-cmdf)
    (setq i (1+ i))
  )
  (vl-cmdf "undo" "e")
  (princ)
  (setvar "osmode" 16383)
)
 楼主| 发表于 2020-3-21 15:19 | 显示全部楼层
可以啦,谢谢Andyhon老师的指导
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-2 11:08 , Processed in 0.906168 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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