Jump to content

Explode the new array (rectangular) objects


sage12

Recommended Posts

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.

Link to comment
Share on other sites

https://www.cadtutor.net/forum/topic/56586-explode-the-new-array-rectangular-objects/

;; 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)
	

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...