Author Topic: BURST everything until you can't burst no more!!  (Read 4705 times)

0 Members and 1 Guest are viewing this topic.

Guest

  • Guest
BURST everything until you can't burst no more!!
« on: August 22, 2007, 04:49:35 PM »
We've got some drawings from a client who binds everything when they send us the updated backgrounds (not a big deal).  However, after they bind everything, their backgrounds consist of nested blocks within nested blocks within nested blocks, wash, rinse, repeat.  Does anyone have any kind of "SUPER" burst command that will burst (not explode) blocks until all blocks are bursted??!?  We're wasting a TON of time trying to extract what we need from their drawings.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: BURST everything until you can't burst no more!!
« Reply #1 on: August 22, 2007, 06:15:08 PM »
See if this works for you.
Code: [Select]
(defun c:Test (/ Sel BlkObj CurSpace MyExplodeBlock)

(defun MyExplodeBlock (BlkObj CurSpace / tempTextObj tempObjList)

(if (vl-catch-all-error-p (setq tempObjList (vl-catch-all-apply 'vlax-invoke (list BlkObj "Explode"))))
(prompt
(strcat
"\n Could not explode block "
(vla-get-Name BlkObj)
" inserted at location "
(vl-princ-to-string
(vlax-get BlkObj 'InsertionPOint)
)
)
)
(progn
(foreach obj tempObjList
(cond
((= (vla-get-ObjectName obj) "AcDbAttributeDefinition")
(vla-Delete obj)
)
((= (vla-get-ObjectName obj) "AcDbBlockReference")
(MyExplodeBlock obj CurSpace)
)
(t
(foreach prop '( "Layer"
"Color"
"Linetype"
"LinetypeScale"
)
(vlax-put obj prop (vlax-get BlkObj prop))
)
)
)
)
(if (equal (vla-get-HasAttributes BlkObj) :vlax-true)
(foreach Att (append (vlax-invoke BlkObj 'GetAttributes) (vlax-invoke BlkObj 'GetConstantAttributes))
(setq tempTextObj
(vlax-invoke
CurSpace
'AddText
(vlax-get Att 'TextString)
(vlax-get Att 'InsertionPoint)
(vlax-get Att 'Height)
)
)
(foreach prop '( "Alignment"
"Backward"
"Color"
"Layer"
"Linetype"
"LinetypeScale"
"Lineweight"
"Normal"
"ObliqueAngle"
"Rotation"
"ScaleFactor"
"StyleName"
"TextAlignmentPoint"
;"TextGenerationFlag"
"UpsideDown"
"Visible"
)
(vlax-put tempTextObj prop (vlax-get Att prop))
)
)
)
(vla-Delete BlkObj)
)
)
)

(setq CurSpace
(vlax-get
(vla-get-ActiveDocument (vlax-get-Acad-Object))
(if (equal (getvar "cvport") 1)
"PaperSpace"
"ModelSpace"
)
)
)
(if
(and
(setq Sel (entsel "\n Select block to explode until no mas blocks: "))
(setq BlkObj (vlax-ename->vla-object (car Sel)))
(= (vla-get-ObjectName BlkObj) "AcDbBlockReference")
)
(MyExplodeBlock BlkObj CurSpace)
)
(princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CADaver

  • Guest
Re: BURST everything until you can't burst no more!!
« Reply #2 on: August 23, 2007, 12:20:00 AM »
Wanna flatten it while you're at it??



sorry couldn't resist...

Guest

  • Guest
Re: BURST everything until you can't burst no more!!
« Reply #3 on: August 23, 2007, 08:12:42 AM »
Wanna flatten it while you're at it??



sorry couldn't resist...

Seeing as how I'm referencing a building floor plan (well, actually, it's 3 different levels due to the grade changes) into a site plan for coordination purposes only, I probably will!  I don't need a 3D floor plan to see where the mechanical spaces are.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: BURST everything until you can't burst no more!!
« Reply #4 on: August 23, 2007, 08:21:17 AM »
Wanna flatten it while you're at it??



sorry couldn't resist...

Seeing as how I'm referencing a building floor plan (well, actually, it's 3 different levels due to the grade changes) into a site plan for coordination purposes only, I probably will!  I don't need a 3D floor plan to see where the mechanical spaces are.

Jeeze while you are at why don't explode the dimensions,  you don't need dimesions to see the mechanical spaces.   :-P :evil:
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Guest

  • Guest
Re: BURST everything until you can't burst no more!!
« Reply #5 on: August 23, 2007, 08:25:15 AM »
I'm actually going to delete the dimensions.

These drawings are a mess.... references bound inside of references bound inside of references....  I just want to strip them down, make them as small as possible and use only the information that I need.  Is that too much to ask??!?  :-)

Here's just a little snippet of what I have to deal with for layers.  Notice the number of layers.  We don't have that many for our site plan!!

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: BURST everything until you can't burst no more!!
« Reply #6 on: August 23, 2007, 08:31:53 AM »
I'm actually going to delete the dimensions.

These drawings are a mess.... references bound inside of references bound inside of references....  I just want to strip them down, make them as small as possible and use only the information that I need.  Is that too much to ask??!?  :-)

Here's just a little snippet of what I have to deal with for layers.  Notice the number of layers.  We don't have that many for our site plan!!

Good it not my current project. 
My building elevations are set up that way.  102 instances of 38 xrefs and what is not counted is the nested xrefs within the 38 xrefs.  But I don't bind.  I etransmit it as is and let you guys do what ever you want to it.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

T.Willey

  • Needs a day job
  • Posts: 5251
Re: BURST everything until you can't burst no more!!
« Reply #7 on: August 23, 2007, 12:12:28 PM »
Did the code I provided work?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Josh Nieman

  • Guest
Re: BURST everything until you can't burst no more!!
« Reply #8 on: August 23, 2007, 12:15:05 PM »
Wanna flatten it while you're at it??



sorry couldn't resist...

 :lmao:

Guest

  • Guest
Re: BURST everything until you can't burst no more!!
« Reply #9 on: August 23, 2007, 12:21:07 PM »
Did the code I provided work?

What little bit I tried so far, yes.

Thanks.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: BURST everything until you can't burst no more!!
« Reply #10 on: August 23, 2007, 12:47:34 PM »
Did the code I provided work?

What little bit I tried so far, yes.

Thanks.
Cool.  You're welcome.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

LE

  • Guest
Re: BURST everything until you can't burst no more!!
« Reply #11 on: August 28, 2007, 10:53:22 AM »

Guest

  • Guest
Re: BURST everything until you can't burst no more!!
« Reply #12 on: August 28, 2007, 10:59:08 AM »
Matt;

See if this works also....


http://www.theswamp.org/index.php?topic=18383.msg224681#msg224681

Nice!  Very fast.  I'm keeping this one!  :wink: