<?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 or explode a block in vb.net and retain text attributes in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5979362#M37527</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#000080"&gt;&amp;gt;&amp;gt; An exception of type 'System.IO.FileNotFoundException' occurred in WpfAutoCAD.exe&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;What is "&lt;EM&gt;WpfAutoCAD.exe&lt;/EM&gt;"? Is that your .NET project and you are creating an EXE which controls AutoCAD from outside?&lt;/P&gt;
&lt;P&gt;Then sorry, the code from the link will not work, this was designed to run in the managed environment within AutoCAD (loaded managed DLL), not from outside of AutoCAD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Outside of AutoCAD you are limited to ActiveX/COM or your EXE loads a DLL and starts it's code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jan 2016 12:17:09 GMT</pubDate>
    <dc:creator>Alfred.NESWADBA</dc:creator>
    <dc:date>2016-01-08T12:17:09Z</dc:date>
    <item>
      <title>Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5975293#M37520</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Overview:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to explode or burst all blocks using VB.net (Visual Studio 2015) in either AutoCAD 2014 or AutoCAD 2015.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment the "explode" command reverts all the text elements to their tag names and any repositioning of elements within a block, after it was inserted, is lost.&lt;/P&gt;&lt;P&gt;Effectively it gives you current saved block definition and you lose all the custom attributes entered when you insert the block. The "burst" command does not appear to be available as a method from vb.net although it may be possible through the "SendCommand" and performing a "BURST" on the current selected object.&lt;/P&gt;&lt;P&gt;But this would mean selecting the object in the drawing and this I cannot get to work.&lt;/P&gt;&lt;P&gt;A minor issue with the "BURST" command is it seems to default some of the "Line Types" to layer 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have looked at "SelectionSets" for a document, but it is not clear how you add an object to a selection set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Is there a method of doing a "BURST" using vb.net and retain all the attributes?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="line-height: 15px;"&gt;Can a selection set be used by the "SendCommand" function?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for any help you can offer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample Code&lt;/STRONG&gt;&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Imports AutoCAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Module Module1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim AcadApp As AcadApplication&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim acadDoc As AcadDocument&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim acadDb As AcadDatabase&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim acadEditor As AcadObject&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim acadPref As AcadPreferences&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim acadxref As AcadBlockReference&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim objEntity As AcadEntity&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim objLayer As AcadLayer&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim objText As AcadText&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim objNewLayer As Object&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim txtSearch As String&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim intTextEntities As Integer&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim intMatch As Integer&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp;Dim blnFound As Boolean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Public Sub convert()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;On Error Resume Next&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Debug.Print("Start: " &amp;amp; Date.Now())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;AcadApp = GetObject(, "AutoCAD.Application")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;If Err().Number Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp; &amp;nbsp; AcadApp = CreateObject("AutoCAD.Application", vbNullString)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;End If&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;acadPref = AcadApp.Preferences&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;AcadApp.Documents.Open("C:\temp\BlockTest.dwg", False)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;AcadApp.Visible = True&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;acadDoc = AcadApp.ActiveDocument&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;acadDb = acadDoc.Database&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Debug.Print("Blocks: " &amp;amp; acadDb.Blocks.Count)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: normal; color: #008000; font-family: 'courier new', courier;"&gt;For Each acadBlocks In acadDb.Blocks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp; &amp;nbsp; Debug.Print("Block Name: " &amp;amp; acadBlocks.Name())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Next&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Debug.Print("Objects in ModelSpace: " &amp;amp; acadDb.ModelSpace.Count())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;For Each mspaceObj In acadDb.ModelSpace&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp; &amp;nbsp; If TypeOf (mspaceObj) Is AcadBlockReference Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;&amp;nbsp; &amp;nbsp; 'burstObject(mspaceObj)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;Next&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;acadDoc.SaveAs("C:\temp\&lt;SPAN&gt;BlockTest_burst.dwg&lt;/SPAN&gt;")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;acadDoc.Close()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;AcadApp.Quit()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;AcadApp = Nothing&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;End Sub&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#008000"&gt;End Module&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;'Dim ss As AcadSelectionSet&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;'With acadDoc.SelectionSets&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;' &amp;nbsp; While .Count &amp;gt; 0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(0).Delete()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;' &amp;nbsp; &amp;nbsp;End While&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;' &amp;nbsp; &amp;nbsp;ss = .Add("$DynBlocks$")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End With&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;'If TypeOf (mspaceObj) Is AcadBlockReference Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'If mspaceObj.HasAttributes = True Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'Debug.Print(mspaceObj.Name)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'Debug.Print("====================")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'varAttributes = mspaceObj.GetAttributes&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'For n = 0 To UBound(varAttributes)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'If checkProperty(varAttributes(n), "Invisible") Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'If varAttributes(n).Invisible = False Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'varAttributes(n).TagString = ""&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'Debug.Print(varAttributes(n).TagString &amp;amp; " - " &amp;amp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'varAttributes(n).TextString &amp;amp; " - " &amp;amp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'varAttributes(n).Invisible)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'Next&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;''sset = acadDoc.SelectionSets.Add("SS1")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;''Set sset = ThisDrawing.SelectionSets.Add("SS1")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;''sset.AddItems(mspaceObj)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'' Prompt the user to select objects&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'' and add them to the selection set.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'' To finish selecting, press ENTER.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;''sset.SelectOnScreen()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;''mspaceObj.Selected()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;''acadDoc.SendCommand("BURST " &amp;amp; vbCr)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'explodedObjects = mspaceObj.Explode()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;''mspaceObj.Delete()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'For n = UBound(explodedObjects) To 0 Step -1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'ObjDel = False&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'If explodedObjects(n).EntityName = "AcDbAttributeDefinition" Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'If explodedObjects(n).Invisible = True Or explodedObjects(n).TextString = "" Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'explodedObjects(n).Delete()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'ObjDel = True&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'If ObjDel = False Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'If explodedObjects(n).Layer = 0 Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'explodedObjects(n).Layer = mspaceObj.Layer.ToString&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'Next&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'mspaceObj.Delete()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;'End If&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 11:17:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5975293#M37520</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-06T11:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5975469#M37521</link>
      <description>&lt;P&gt;you can use the _BURST command from the express-tools, that explodes block-insertions and creates text-objects from the attribute-values.&lt;BR /&gt;&lt;BR /&gt;But keep in mind: exploding block-insertions destroys the structure in your drawing, you will lose a lot of possibilities like BOM-lists (using DATAEXTRACTION) and a lot more! -Alfred.NESWADBA-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use BURST, don't use EXPLODE.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 13:46:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5975469#M37521</guid>
      <dc:creator>wispoxy</dc:creator>
      <dc:date>2016-01-06T13:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5975554#M37522</link>
      <description>&lt;P&gt;Hi Simon,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the quick reply.&lt;/P&gt;&lt;P&gt;We need to convert a large number of drawings and remove block intelligence, so we need to use a program like vb.Net&lt;/P&gt;&lt;P&gt;When you say to use "_BURST" from the express tools does this mean it can be done from within .Net code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best I can do so far is to use the Send command and burst "ALL" blocks - see below.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;But I would prefer to burst the blocks one at a time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I select an object in VB.Net using selection sets?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;Imports AutoCAD&lt;BR /&gt;Module Module1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;Public Sub convert()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;Dim AcadApp As AcadApplication&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;Dim acadDoc As AcadDocument&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;Dim acadDb As AcadDatabase&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;Dim dwgName As String&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;dwgName = "C:\temp\BlockTest.dwg"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;Debug.Print("Start: " &amp;amp; Date.Now())&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;Try&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;AcadApp = GetObject(, "AutoCAD.Application")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;AcadApp = CreateObject("AutoCAD.Application", vbNullString)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;End Try&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;Try&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;AcadApp.Documents.Open(dwgName, False)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;MsgBox("Drawing not found: " &amp;amp; dwgName)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;Exit Sub&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;End Try&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;AcadApp.Visible = True&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;acadDoc = AcadApp.ActiveDocument&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;acadDb = acadDoc.Database&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;acadDoc.SendCommand("cmddia 0" &amp;amp; vbCr)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;acadDoc.SendCommand("filedia 0" &amp;amp; vbCr)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;acadDoc.SendCommand("_BURST ALL" &amp;amp; vbCr &amp;amp; vbCr)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;acadDoc.SaveAs("C:\temp\&lt;SPAN&gt;BlockTest_Burst.dwg&lt;/SPAN&gt;")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;acadDoc.Close()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;AcadApp.Quit()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;AcadApp = Nothing&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;End Sub&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;End Module&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 14:24:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5975554#M37522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-06T14:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5977085#M37523</link>
      <description>&lt;P&gt;a long time ago i used this to connect VBA objects to the SendComman. Maybe it works for VB.NET as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SymSelect = "(handent """ &amp;amp; Symbol.Handle &amp;amp; """)"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisDrawing.SendCommand "rotate" &amp;amp; vbCr &amp;amp; SymSelect &amp;amp; vbCr &amp;amp; vbCr &amp;amp; Symbol.InsertionPoint(0) &amp;amp; "," &amp;amp; Symbol.InsertionPoint(1) &amp;amp; vbCr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Call Thisdrawing.SendCommand("(setvar ""users1"" (cdr (assoc 5 (entget (cdr (assoc 340 (entget (handent """ &amp;amp; vp.Handle &amp;amp; """)))))))) ")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;set vpClipObj= Thisdrawing.HandleToObject(Thisdrawing.GetVariable("users1"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This C# example from my mentor&amp;nbsp;&lt;A href="http://adndevblog.typepad.com/autocad/balaji-ramamoorthy.html" target="_self"&gt;Balaji Ramamoorthy,&lt;/A&gt; shows you how BURST is done the proper way.&lt;/P&gt;&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2015/06/programmatically-mimic-the-burst-command.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2015/06/programmatically-mimic-the-burst-command.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 08:13:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5977085#M37523</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2016-01-07T08:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5977554#M37524</link>
      <description>&lt;P&gt;I'm not advanced enough yet to recommend anything for .NET You should speak to &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/389680"&gt;@Alfred.NESWADBA﻿&lt;/a&gt; or&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile﻿&lt;/a&gt; they are higher on the top solutions list for .NET&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 14:06:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5977554#M37524</guid>
      <dc:creator>wispoxy</dc:creator>
      <dc:date>2016-01-07T14:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5977811#M37525</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there are some code samples already available out in the www, &lt;A href="http://adndevblog.typepad.com/autocad/net/page/2/" target="_self"&gt;&amp;gt;&amp;gt;&amp;gt;this one&amp;lt;&amp;lt;&amp;lt;&lt;/A&gt; might be the point to start (search for "&lt;EM&gt;Programmatically mimic the Burst command&lt;/EM&gt;" on that site).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 15:52:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5977811#M37525</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2016-01-07T15:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5979239#M37526</link>
      <description>&lt;P&gt;Hi Alfred,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the link to the code.&lt;/P&gt;&lt;P&gt;The example appears to be C#.Net, which is OK, because I can convert the statements to VB.Net.&lt;/P&gt;&lt;P&gt;However, I am having an issue with some of the methods and types not being available.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;Transaction (type)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;TransactionManager.StartTransaction (method for AutoCAD database)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used a standard VB.Net template for a Microsoft WPF application - as I do not have any AutoCAD templates.&lt;/P&gt;&lt;P&gt;The target framework is set to .Net 4.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the references I have specified "Interop.AutoCAD.dll" and in the imports:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;Imports AutoCAD&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did try to add the following references via the "Browse" option:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN style="font-weight: 400;"&gt;■ acdbmgd.dll&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN style="font-weight: 400;"&gt;■ acmgd.dll&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I do this, the program fails to find them when I debug the application.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;An exception of type 'System.IO.FileNotFoundException' occurred in WpfAutoCAD.exe but was not handled in user code&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Additional information: Could not load file or assembly 'Acdbmgd.dll' or one of its dependencies. The specified module could not be found.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It might be I need to include another DLL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you point me to a VB.Net template for AutoCAD 2014?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 10:38:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5979239#M37526</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-08T10:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Burst or explode a block in vb.net and retain text attributes</title>
      <link>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5979362#M37527</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#000080"&gt;&amp;gt;&amp;gt; An exception of type 'System.IO.FileNotFoundException' occurred in WpfAutoCAD.exe&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;What is "&lt;EM&gt;WpfAutoCAD.exe&lt;/EM&gt;"? Is that your .NET project and you are creating an EXE which controls AutoCAD from outside?&lt;/P&gt;
&lt;P&gt;Then sorry, the code from the link will not work, this was designed to run in the managed environment within AutoCAD (loaded managed DLL), not from outside of AutoCAD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Outside of AutoCAD you are limited to ActiveX/COM or your EXE loads a DLL and starts it's code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 12:17:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/burst-or-explode-a-block-in-vb-net-and-retain-text-attributes/m-p/5979362#M37527</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2016-01-08T12:17:09Z</dc:date>
    </item>
  </channel>
</rss>

