乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 23|回复: 2

[编程交流] Explode the new array (rectang

[复制链接]

1

主题

1

帖子

0

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 14:30:12 | 显示全部楼层 |阅读模式
Is there a way to globally explode all the arrays (rectangular) in my design. Some of the arrays are buried in nested blocks. I didn't know if anyone has a lsp routine that could do this. All the hidden blocks that the array command makes is not working well with our conversion programs.
回复

使用道具 举报

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-5 15:29:14 | 显示全部楼层
I have moved your thread to the AutoLISP, Visual LISP & DCL Forum.
回复

使用道具 举报

rlx

21

主题

1505

帖子

1551

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
81
发表于 2022-7-5 15:57:36 | 显示全部楼层
https://www.cadtutor.net/forum/topic/56586-explode-the-new-array-rectangular-objects/
       
  1. ;; Explode all 'New Type' Arrays  -  Lee Mac(defun c:exarrays ( / doc enx )   (vlax-for blk (vla-get-blocks (setq doc (vla-get-activedocument (vlax-get-acad-object))))       (if (= :vlax-false (vla-get-isxref blk))           (vlax-for obj blk               (if                   (and                       (= "AcDbBlockReference" (vla-get-objectname obj))                       (setq enx (entget (vlax-vla-object->ename obj)))                       (setq enx (cdr (assoc 330 (member '(102 . "{ACAD_REACTORS") enx))))                       (= "ACDBASSOCDEPENDENCY" (cdr (assoc 0 (entget enx))))                   )                   (explode obj)               )           )       )   )   (vla-regen doc acallviewports)   (princ))(defun explode ( obj / lst )   (if       (and           (= "AcDbBlockReference" (vla-get-objectname obj))           (wcmatch (vla-get-effectivename obj) "`*U*")           (vlax-write-enabled-p obj)       )       (if           (not               (vl-catch-all-error-p                   (setq lst                       (vl-catch-all-apply 'vlax-invoke (list obj 'explode))                   )               )           )           (progn               (vla-delete obj)               (foreach obj lst (explode obj))           )       )   ))(vl-load-com) (princ)       
         
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-14 23:30 , Processed in 1.667788 second(s), 59 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表