Lisp to explode multiple times.

Lisp to explode multiple times.

Anonymous
Not applicable
2,035 Views
7 Replies
Message 1 of 8

Lisp to explode multiple times.

Anonymous
Not applicable

Can someone help me do the code.

I want to explode the following"

1. All blocks except the border with block name  "TitleBorder"

2. Explode all polylines in the drawing.

Thanks in advance.

0 Likes
2,036 Views
7 Replies
Replies (7)
Message 2 of 8

imadHabash
Mentor
Mentor

Hi,

you can select all what you want to explode by QSELECT or SelectSimilar commands ( watch the SEttings ) then run explode command . 

 

 

 

Imad Habash

EESignature

Message 3 of 8

Anonymous
Not applicable

Sorry but I need the fastest way since I have 1000 isometric drawings to do this. Thanks!

0 Likes
Message 4 of 8

RobDraw
Mentor
Mentor

Sounds fairly simple. What have you got so far?


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 5 of 8

R_Tweed
Advisor
Advisor

As an option, you could write a script using the ssx command to create your selection set then run explode.  Use an autoscript app to run across multiple dwgs if your looking to automate.  ssx accepts wildcard input options. (*, ~, ?)

  

0 Likes
Message 6 of 8

Anonymous
Not applicable

This is what I got but it will delete all blocks.

 

(defun c:xblock ()
(setq ss (ssget "x" '((0 . "insert")))
c 0)
(repeat (sslength ss)
(command ".explode" (ssname ss c))
(setq c (1+ c)))

)
0 Likes
Message 7 of 8

Sea-Haven
Mentor
Mentor

You may want Burst rather than explode for the blocks. The code provided will not erase but explode does not save the attributes.

 

Also look into Aeccoreconsole this will process your 1000 dwgs there are various methods but it can automate complete directories.

 

A more manual approach is use a script to open explode, save and close.

0 Likes
Message 8 of 8

3wood
Advisor
Advisor

To handle a single drawing, you can try EXPLODEALL and use it in the script below. 

Then you can use other tools to process multiple drawings.

 

(defun auto1 ()
  (explodeall (ssget "X" '((-4 . "<NOT")(2 . "TitleBorder")(-4 . "NOT>")(0 . "INSERT"))))
  (initcommandversion 2)
  (command ".explode" (ssget "x" '((0 . "LWPOLYLINE"))) "")
  )