<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Burst All including nested blocks in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7502716#M129229</link>
    <description>&lt;P&gt;I'm running into trouble running this lisp.&amp;nbsp; I copied the text from the last section and&amp;nbsp;saved it into a .lsp file, loaded it, then tried to initiate it with nukeblocks but that doesn't seem to be working.&amp;nbsp; Can you upload the lisp here as attachment or let me know how I am fouling this up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just need a lisp that will burst all blocks to 0, removing XREF's first is something I am doing manually.&amp;nbsp; Also, do not want this to&amp;nbsp;explode any hatches.&amp;nbsp; something that has to be done discriminately on my end as we keep some and delete others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2017 18:44:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-30T18:44:24Z</dc:date>
    <item>
      <title>Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6523580#M129215</link>
      <description>&lt;P&gt;&amp;nbsp;So I'm trying to create a lisp which will burst everything in the drawing but not freeze up completely if it meets un-explodeable objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	(setq burstrc 0)
	
	(while
		(and
			(/= (ssget "_X" '((0 . "Insert"))) nil)
			(&amp;lt;= burstrc 5)
		)
		
		(setq compare1 (ssget "_X" '((0 . "Insert"))))

		(sssetfirst nil (ssget "_X" '((0 . "Insert"))))
		(c:burst)
		
		(setq compare2 (ssget "_X" '((0 . "Insert"))))
		
		(if 	(and 
				(&amp;gt; (sslength compare1) 0)
				(&amp;gt; (sslength compare2) 0)
			)
			(if (= (sslength compare1) (sslength compare2))
				(setq burstrc (+ burstrc 1))
				(setq burstrc 0)
			)
		)
	)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Idea is that after 5 attempted bursts without the amount of "insert" changing the loop will be broken.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately&amp;nbsp;at the moment&amp;nbsp;im getting:&lt;/P&gt;&lt;PRE&gt;; error: bad argument type: lselsetp nil&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I can just keep executing the command and it will burst everything, but that kind of defeats the point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 19:53:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6523580#M129215</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T19:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6523688#M129216</link>
      <description>&lt;P&gt;My guess: &amp;nbsp;If it has burst everything, then the first time through, the 'compare2' variable will be nil, and on subsequent runs &lt;EM&gt;both&lt;/EM&gt; 'compare1' &lt;EM&gt;and&lt;/EM&gt; 'compare2' will be nil, and the routine is&amp;nbsp;objecting to that when checking their&amp;nbsp;lengths.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, there's no need to check whether something is &lt;EM&gt;not equal to nil&lt;/EM&gt; -- you can just check &lt;EM&gt;whether it exists at all&lt;/EM&gt;, and while you're at it, you may as well set that 'compare1' variable &lt;EM&gt;in the process,&lt;/EM&gt; and use it in place of that second (ssget). &amp;nbsp;When it's no longer finding any, a&amp;nbsp;selection-set variable&amp;nbsp;will be &lt;EM&gt;nil&lt;/EM&gt;, not an empty selection set, so you never need to check whether it's more than 0 items long. &amp;nbsp;Try something like [untested]:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;(setq burstrc 0)
(while
  (and
    (&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;setq compare1&lt;/STRONG&gt;&lt;/FONT&gt; (ssget "_X" '((0 . "Insert"))))&lt;FONT color="#00CCFF"&gt;; still finding some [nil if none]&lt;/FONT&gt;
    (&amp;lt;= burstrc 5)&lt;BR /&gt;  )
  (sssetfirst nil &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;compare1&lt;/STRONG&gt;&lt;/FONT&gt;)
  (c:burst)
  (if&lt;BR /&gt;    (setq compare2 (ssget "_X" '((0 . "Insert"))))&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;; found more after burst [&lt;STRONG&gt;nil&lt;/STRONG&gt; if none left]&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;    (if (= (sslength compare1) (sslength compare2))&lt;FONT color="#00CCFF"&gt;; then check lengths&lt;/FONT&gt;
      (setq burstrc (+ burstrc 1))&lt;FONT color="#999999"&gt;; then&lt;/FONT&gt;
      (setq burstrc 0)&lt;FONT color="#999999"&gt;; else&lt;/FONT&gt;
    )&lt;FONT color="#999999"&gt;; inner if&lt;/FONT&gt;
  )&lt;FONT color="#999999"&gt;; outer if&lt;/FONT&gt;
)&lt;FONT color="#999999"&gt;; while&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 20:46:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6523688#M129216</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-25T20:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6523859#M129217</link>
      <description>Do not use  "_X" key for ssget, because c:burst could proceed with entities only in active layout (but (ssget "_X" '((0 . "INSERT"))) will return ALL blocks in ALL layouts). Or you have to use lisp function burst-one (as i remember it name; the best practive is to check busrt comand code)</description>
      <pubDate>Thu, 25 Aug 2016 22:08:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6523859#M129217</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2016-08-25T22:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524062#M129218</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/252430"&gt;@kpblc2000&lt;/a&gt; wrote:&lt;BR /&gt;Do not use "_X" key for ssget, because c:burst could proceed with entities only in active layout (but (ssget "_X" '((0 . "INSERT"))) will return ALL blocks in ALL layouts). Or you have to use lisp function burst-one ....&lt;HR /&gt;....&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Good point, but you &lt;EM&gt;can&lt;/EM&gt; safely do it with "_X" &lt;EM&gt;if&lt;/EM&gt; you &lt;FONT color="#0000ff"&gt;&lt;FONT color="#000000"&gt;filter for only Blocks&lt;/FONT&gt; in the current layout&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(ssget "_X" (list '(0 . "INSERT") &lt;FONT color="#0000ff"&gt;(cons 410 (getvar 'ctab))&lt;/FONT&gt;))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[It might be worth defining that as a little subroutine, so you don't have to spell it all out&amp;nbsp;multiple times.]&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 01:05:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524062#M129218</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-26T01:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524302#M129219</link>
      <description>CTAB system variable is not enough: ctab can return Layout1, but TILEMODE will be equal to 1 (active layout is Layout1, but you activated ModelSpace by command _.MSPACE).&lt;BR /&gt;And there is another possible trouble: you don't check frozen or locked layers within selection. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 26 Aug 2016 05:47:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524302#M129219</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2016-08-26T05:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524826#M129220</link>
      <description>&lt;P&gt;Sounds like you're getting advice on building an improvised explosive device. &amp;nbsp;Just keep that program away from me and my drawings.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 12:05:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524826#M129220</guid>
      <dc:creator>dbroad</dc:creator>
      <dc:date>2016-08-26T12:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524912#M129221</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/252430"&gt;@kpblc2000&lt;/a&gt; wrote:&lt;BR /&gt;CTAB system variable is not enough: ctab can return Layout1, but TILEMODE will be equal to 1 (active layout is Layout1, but you activated ModelSpace by command _.MSPACE).&lt;BR /&gt;And there is another possible trouble: you don't check frozen or locked layers within selection. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Given the task, I wouldn't expect [for me, if I needed to do such a thing] ever to do this from a Layout, but only in Model Space, but the OP may have different circumstances.&amp;nbsp; Certainly a routine could be made to force itself into Model Space, and to thaw and unlock all Layers, etc.&amp;nbsp; And there are other possible circumstances that it might be appropriate to account for, depending on the OP's needs:&amp;nbsp; If&amp;nbsp;any of the Insert objects found&amp;nbsp;are &lt;EM&gt;Xrefs&lt;/EM&gt;, should they be Bound into the drawing, so they and any nested Blocks [or further-nested Xrefs] in them can also be Exploded?&amp;nbsp; Should Blocks defined to not allow Exploding have their definitions altered to allow it?&amp;nbsp; Should things like Polylines and/or Mtext and/or Dimensions also be Exploded?&amp;nbsp; [Of course, if you did all of those things, there wouldn't be any getting to the point of unexplodable Insert objects, so this particular form of routine wouldn't be needed.]&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 12:48:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6524912#M129221</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-26T12:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6525124#M129222</link>
      <description>&lt;PRE&gt;(setq e t)
(while e
  (setq e nil) 
  (vlax-for layout (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
    (vlax-for obj (vla-get-block layout)
      (and
        (= "AcDbBlockReference" (vla-get-objectname obj))
        (vlax-property-available-p obj 'effectivename)
        (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-explode (list obj))))
        (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-delete  (list obj))))
        (setq e t)
      )
    )
  )
)&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2016 14:12:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6525124#M129222</guid>
      <dc:creator>jdiala</dc:creator>
      <dc:date>2016-08-26T14:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6529107#M129223</link>
      <description>&lt;P&gt;Ok this seems to have worked. Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using this on old Piping &amp;amp; Instrument Diagrams that were drawn on microstation in the early 90s. I've been exploding all the blocks to get rid all the formatting that I don't need and then I can setup my own layers etc. The whole process of importing them from microstation in the first place means the drawings are a mess so exploding the blocks for a few valves (although not ideal) isn't really a big deal.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 15:53:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6529107#M129223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-29T15:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530188#M129224</link>
      <description>Rather than stopping because of one catch-all error, why not create a list of "bads", continue, and report the list of "bads" at the conclusion? At least that informs the user of certain failures and he/she can take some kind of further action.&lt;BR /&gt;&lt;BR /&gt;I like your use of the Stephan Koster method of anding.</description>
      <pubDate>Tue, 30 Aug 2016 01:33:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530188#M129224</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2016-08-30T01:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530731#M129225</link>
      <description>That's sounds like a good idea, but how would you do that? I'm still new to Auto Lisp.</description>
      <pubDate>Tue, 30 Aug 2016 09:53:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530731#M129225</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-30T09:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530826#M129226</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt; wrote:&lt;BR /&gt;....&amp;nbsp;a list of "bads", continue, and report the list of "bads" at the conclusion? At least that informs the user of certain failures and he/she can take some kind of further action.&lt;BR /&gt;....&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;@Anonymous wrote:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;That's sounds like a good idea, but how would you do that? ....&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;P&gt;If the 'compare1' and 'compare2'&amp;nbsp; variables in the code in Post 2&amp;nbsp;are &lt;EM&gt;not localized&lt;/EM&gt;, then after&amp;nbsp;the routine is&amp;nbsp;finished, those will both be selection sets [not lists, but easy enough to turn into one] of all remaining unexplodable Insert objects.&amp;nbsp; They can then be easily put on a certain Layer, or selected/highlighted/gripped, or their names reported to the User and/or exported to a file, or whatever.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 10:48:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530826#M129226</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-30T10:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530942#M129227</link>
      <description>Ah ok, I get what your saying. I'm going to go and do some more tutorials and stuff so I can get to grip with everything a bit more, but what you've given me will do fine for just now. Your help is really appreciated. Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 30 Aug 2016 12:16:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6530942#M129227</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-30T12:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6531735#M129228</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;PRE&gt;(defun nukeblocks ( / error errors n)
  (setq n 0)
  (vlax-for layout (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
    (vlax-for obj (vla-get-block layout)
      (and
        (= "AcDbBlockReference" (vla-get-objectname obj))
        (vlax-property-available-p obj 'effectivename)
        (if  (vl-catch-all-error-p (setq error (vl-catch-all-apply 'vla-explode (list obj))))
          (setq errors (cons (vl-catch-all-error-message error) errors))
          (progn
            (setq n (1+ n))
            (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-delete  (list obj))))
          )
        )
      )
    )
  )
  (princ (strcat "\nExploded " (itoa n) " blocks."))
  (and
    errors
    (princ "\n\nERRORS:")
    (mapcar 'write-line errors)
  )
  (princ)
)&lt;BR /&gt;&lt;BR /&gt;That's just an example of gathering and reporting errors. You can have it tell you more if you want.&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 17:09:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/6531735#M129228</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2016-08-30T17:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7502716#M129229</link>
      <description>&lt;P&gt;I'm running into trouble running this lisp.&amp;nbsp; I copied the text from the last section and&amp;nbsp;saved it into a .lsp file, loaded it, then tried to initiate it with nukeblocks but that doesn't seem to be working.&amp;nbsp; Can you upload the lisp here as attachment or let me know how I am fouling this up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just need a lisp that will burst all blocks to 0, removing XREF's first is something I am doing manually.&amp;nbsp; Also, do not want this to&amp;nbsp;explode any hatches.&amp;nbsp; something that has to be done discriminately on my end as we keep some and delete others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 18:44:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7502716#M129229</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-30T18:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7503029#M129230</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp; I ...&amp;nbsp;tried to initiate it with nukeblocks but that doesn't seem to be working.&amp;nbsp; ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since it begins with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun nukeblocks ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it's not a &lt;EM&gt;command&lt;/EM&gt; definition but a &lt;EM&gt;function&lt;/EM&gt; definition. &amp;nbsp;You can either use it as a function, by putting parentheses around it when you type it in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;nukeblocks&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or change the definition opening by putting the &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;C:&lt;/FONT&gt;&lt;/STRONG&gt; in front of the name to make it a &lt;EM&gt;command:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;C:&lt;/FONT&gt;&lt;/STRONG&gt;nukeblocks ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in which case typing just nukeblocks should run it.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 20:37:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7503029#M129230</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-10-30T20:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7503218#M129231</link>
      <description>&lt;P&gt;Thanks Kent,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seemed to run fine.&amp;nbsp; My only question now is this the same method as the burst express tool?&amp;nbsp; I know it says explode in the command but I am hoping that it is retaining parent layer properties etc. which burst does opposed to explode.&amp;nbsp; I am guessing he grabbed most of this code from the burst express tool code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did see a previous thread that you had about burst looping until 0.&amp;nbsp; I am essentially just trying to avoid select all in model space and typing BURST over and over until there are 0 blocks left.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, is there code in here similar to the lisp that sets unexplodable flagged blocks to explodable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saw this other code and I'm wondering what differences there might be, or which you think is better?&lt;/P&gt;&lt;PRE&gt;(defun Burstzero (/ GoAgain blks blk)
  (vl-load-com)
  (setq GoAgain T)					; to begin with [make at least one pass]
  (while
    (and
      GoAgain						; will be nil once it makes a pass without finding any non-Xref blocks
      (setq blks (ssget "_X" '((0 . "INSERT")))) 	; includes Xref's
    )							; and
     (setq GoAgain nil)					; "zero out" initially for this pass
     (repeat (sslength blks)
       (setq blk (ssname blks 0))			; first [remaining] item in selection
       (if (not	(vlax-property-available-p
		  (vlax-ename-&amp;gt;vla-object blk) 'Path))	; i.e. it's not an Xref [ordinary Blocks don't have Path property]
	 (progn
	   (setq GoAgain T)				; it found one, so run the loop again after this pass
	   (sssetfirst nil (ssadd blk))
	   (c:burst)
	 )						; progn
       )						; if
       (ssdel blk blks)					; remove that entity name from selection, go on to next
     )							; repeat
  )							; while
)							; defun&lt;/PRE&gt;&lt;P&gt;I believe I grabbed this from the other thread about bursting with loop.&amp;nbsp; If it avoids selecting XREF's then that's a plus, but not necessary.&amp;nbsp; XREF's will be detached typically.&amp;nbsp; It also can't be specific to model space as we sometimes have to burst blocks in title blocks which live in paper space.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Warren&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 22:40:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7503218#M129231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-30T22:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7503369#M129232</link>
      <description>&lt;P&gt;Upon further investigation the portion of code posted earlier with the nukeblocks call didn't seem to actually be bursting.&amp;nbsp; as I saw many blocks being broken down further than intended, I saw that tag #'s were being broken down into jibberish text probably some portion of those being exploded and not burst.&amp;nbsp; I have been using the burstzero code I showed in my last post with a call c:BAB for the command.&amp;nbsp; This version seems to take an approach different that bursting from the parent layer down in a loop though.&amp;nbsp; Not sure it is the best method but it seems like it goes one block at a time?&amp;nbsp; Maybe it is going from the furthest nested block first in order to save time later down the operation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My command line looks something like this:&lt;/P&gt;&lt;PRE&gt;\
1 found

\
1 found

/
&amp;lt;Selection set: 5df2&amp;gt;&lt;/PRE&gt;&lt;P&gt;the 1 found is repetitive, not sure how this code is structured to do such.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Modified code in question here:&lt;/P&gt;&lt;PRE&gt;(defun c:BAB (/ GoAgain blks blk)
  (vl-load-com)
  (setq GoAgain T)					; to begin with [make at least one pass]
  (while
    (and
      GoAgain						; will be nil once it makes a pass without finding any non-Xref blocks
      (setq blks (ssget "_X" '((0 . "INSERT")))) 	; includes Xref's
    )							; and
     (setq GoAgain nil)					; "zero out" initially for this pass
     (repeat (sslength blks)
       (setq blk (ssname blks 0))			; first [remaining] item in selection
       (if (not	(vlax-property-available-p
		  (vlax-ename-&amp;gt;vla-object blk) 'Path))	; i.e. it's not an Xref [ordinary Blocks don't have Path property]
	 (progn
	   (setq GoAgain T)				; it found one, so run the loop again after this pass
	   (sssetfirst nil (ssadd blk))
	   (c:burst)
	 )						; progn
       )						; if
       (ssdel blk blks)					; remove that entity name from selection, go on to next
     )							; repeat
  )							; while
)							; defun&lt;/PRE&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I happened to not have XREF's in the drawing I tested, but is this line calling for it to insert XREF's? Because that would not be my intent.&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#FF0000"&gt;(setq blks (ssget "_X" '((0 . "INSERT")))) 	; includes Xref's&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Warren&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 23:50:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7503369#M129232</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-30T23:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Burst All including nested blocks</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7504374#M129233</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;....,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I happened to not have XREF's in the drawing I tested, but is this line calling for it to insert XREF's? Because that would not be my intent.&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#ff0000"&gt;(setq blks (ssget "_X" '((0 . "INSERT")))) 	; includes Xref's&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To that one question:&amp;nbsp; No, that line is to&amp;nbsp;&lt;EM&gt;find&lt;/EM&gt;&amp;nbsp; all "INSERT"-class objects, and the comment at the end is just to be aware that&amp;nbsp;it &lt;EM&gt;will&lt;/EM&gt;&amp;nbsp; include Xref's [if there are any in the drawing] in the 'blks' selection set.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 11:20:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/burst-all-including-nested-blocks/m-p/7504374#M129233</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-10-31T11:20:07Z</dc:date>
    </item>
  </channel>
</rss>

