<?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 Anonymous block replace or rename with a named block? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252861#M19793</link>
    <description>I have an application that uses a named block which the user has previously inserted. For purposes of discussion, lets call it "MyNamedBlock". Accross multiple erection drawings within a given project there might be a thousand or more of these. &lt;BR /&gt;
When the application is ran on the drawings these named block references are converted to an anonymous block definition using ConvertToAnonymousBlock method.&lt;BR /&gt;
This works great for my purposes.&lt;BR /&gt;
&lt;BR /&gt;
I would like to now create some code that would convert these anonymous block references back to the named block "MyNamedBlock" definition.&lt;BR /&gt;
&lt;BR /&gt;
How might I do this?</description>
    <pubDate>Mon, 12 May 2008 15:08:37 GMT</pubDate>
    <dc:creator>mdhutchinson</dc:creator>
    <dc:date>2008-05-12T15:08:37Z</dc:date>
    <item>
      <title>Anonymous block replace or rename with a named block?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252861#M19793</link>
      <description>I have an application that uses a named block which the user has previously inserted. For purposes of discussion, lets call it "MyNamedBlock". Accross multiple erection drawings within a given project there might be a thousand or more of these. &lt;BR /&gt;
When the application is ran on the drawings these named block references are converted to an anonymous block definition using ConvertToAnonymousBlock method.&lt;BR /&gt;
This works great for my purposes.&lt;BR /&gt;
&lt;BR /&gt;
I would like to now create some code that would convert these anonymous block references back to the named block "MyNamedBlock" definition.&lt;BR /&gt;
&lt;BR /&gt;
How might I do this?</description>
      <pubDate>Mon, 12 May 2008 15:08:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252861#M19793</guid>
      <dc:creator>mdhutchinson</dc:creator>
      <dc:date>2008-05-12T15:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymous block replace or rename with a named block?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252862#M19794</link>
      <description>This may be helpful&lt;BR /&gt;
http://www.draftsperson.net/index.php?title=Anonymous_Blocks_in_AutoCAD&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
http://mechcad-insider.blogspot.com/</description>
      <pubDate>Wed, 14 May 2008 12:02:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252862#M19794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-14T12:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymous block replace or rename with a named block?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252863#M19795</link>
      <description>I looked at this and found that the manual method described no longer works. (2007)&lt;BR /&gt;
... however, the lisp routine does...&lt;BR /&gt;
I may decide to convert it to VBA&lt;BR /&gt;
&lt;BR /&gt;
... any way... thanks!&lt;BR /&gt;
that's two for two.</description>
      <pubDate>Wed, 14 May 2008 12:59:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252863#M19795</guid>
      <dc:creator>mdhutchinson</dc:creator>
      <dc:date>2008-05-14T12:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymous block replace or rename with a named block?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252864#M19796</link>
      <description>i need the same functionality.. to convert an *U block to a block i can rename. I went to draftsperson.net and used the unanon.lsp 2007. It did work. but it also created an error.. everytime i audit the drawing. i get the following:&lt;BR /&gt;
&lt;BR /&gt;
      Extension dictionary 2DB2D Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(3335A)&lt;BR /&gt;
       Extension dictionary 2DB32 Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(3335B)&lt;BR /&gt;
       Extension dictionary 2DB37 Not this object       Set to this&lt;BR /&gt;
AcDbMText(33378)&lt;BR /&gt;
       Extension dictionary 2DB90 Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(3338B)&lt;BR /&gt;
       Extension dictionary 2DBC7 Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(3338C)&lt;BR /&gt;
       Extension dictionary 2DBCC Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(3338D)&lt;BR /&gt;
       Extension dictionary 2DBD1 Not this object       Set to this&lt;BR /&gt;
Pass 2 5800    objects auditedAcDbAttributeDefinition(3338E)&lt;BR /&gt;
       Extension dictionary 2DBD6 Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(3338F)&lt;BR /&gt;
       Extension dictionary 2DBDB Not this object       Set to this&lt;BR /&gt;
AcDbMText(333C6)&lt;BR /&gt;
       Extension dictionary 2DC62 Not this object       Set to this&lt;BR /&gt;
AcDbMText(333C7)&lt;BR /&gt;
       Extension dictionary 2DC6A Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(333C8)&lt;BR /&gt;
       Extension dictionary 2DC72 Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(333C9)&lt;BR /&gt;
       Extension dictionary 2DC77 Not this object       Set to this&lt;BR /&gt;
AcDbAttributeDefinition(333CA)&lt;BR /&gt;
       Extension dictionary 2DC7C Not this object       Set to this&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know how to update the lisp for it to work proper on 2008??&lt;BR /&gt;
&lt;BR /&gt;
Lisp is attached..&lt;BR /&gt;
&lt;BR /&gt;
thx</description>
      <pubDate>Wed, 16 Sep 2009 17:44:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/2252864#M19796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-16T17:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymous block replace or rename with a named block?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/7956224#M19797</link>
      <description>&lt;P&gt;This was the best, and most useful answer as it told me why it became an anonymous block by *E, non-uniformly&amp;nbsp; scaled block, and then I could correct the scale and then explode it. Renaming still and NEVER did work! Please stop suggesting it!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this was most helpful, thank you!&lt;/P&gt;&lt;P&gt;-Jon&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymouswrote:&lt;BR /&gt;This may be helpful&lt;BR /&gt;&lt;A href="http://www.draftsperson.net/index.php?title=Anonymous_Blocks_in_AutoCAD" target="_blank"&gt;http://www.draftsperson.net/index.php?title=Anonymous_Blocks_in_AutoCAD&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mechcad-insider.blogspot.com/" target="_blank"&gt;http://mechcad-insider.blogspot.com/&lt;/A&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="http://www.draftsperson.net/index.php?title=Anonymous_Blocks_in_AutoCAD" target="_blank"&gt;http://www.draftsperson.net/index.php?title=Anonymous_Blocks_in_AutoCAD&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 16:54:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/7956224#M19797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-24T16:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymous block replace or rename with a named block?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/8554356#M19798</link>
      <description>&lt;P&gt;For those who are of the coding ilk...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Public Sub AnonymousBlock_RenameAll()&lt;BR /&gt;'------------------------------------------------------------------------------&lt;BR /&gt;'&lt;BR /&gt;'&lt;BR /&gt;'------------------------------------------------------------------------------&lt;BR /&gt;Dim acEnt As AcadEntity&lt;BR /&gt;Dim sName As String&lt;BR /&gt;Dim acBlk As AcadBlock&lt;BR /&gt;'''''''''''''''''''''''''''''''''''''''&lt;BR /&gt;For Each acEnt In ThisDrawing.ModelSpace&lt;BR /&gt;If acEnt.ObjectName = "AcDbBlockReference" Then&lt;BR /&gt;sName = acEnt.Name&lt;BR /&gt;Select Case True&lt;BR /&gt;Case sName Like "[*]U#*"&lt;BR /&gt;Set acBlk = BlockDef_GetByName(sName)&lt;BR /&gt;Debug.Print&lt;BR /&gt;acBlk.Name = "ANO_" &amp;amp; Mid$(sName, 2)&lt;BR /&gt;ThisDrawing.Utility.Prompt "Renamed Block " &amp;amp; sName &amp;amp; " to " &amp;amp; acBlk.Name &amp;amp; Chr$(10)&lt;BR /&gt;End Select&lt;BR /&gt;End If&lt;BR /&gt;Next acEnt&lt;BR /&gt;'------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 14:24:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/8554356#M19798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-28T14:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymous block replace or rename with a named block?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/8554362#M19799</link>
      <description>&lt;P&gt;oops, forgot something...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Public Function BlockDef_GetByName( _&lt;BR /&gt;ByVal sBlkName As String) As AcadBlock&lt;BR /&gt;'------------------------------------------------------------------------------&lt;BR /&gt;'&lt;BR /&gt;'&lt;BR /&gt;'------------------------------------------------------------------------------&lt;BR /&gt;Dim acBlks As AcadBlocks&lt;BR /&gt;Dim acBlk As AcadBlock&lt;BR /&gt;'''''''''''''''''''''''''''''''''''''''&lt;BR /&gt;On Error GoTo ErrHandler&lt;/P&gt;
&lt;P&gt;Set acBlks = ThisDrawing.Blocks&lt;BR /&gt;Set acBlk = acBlks(sBlkName)&lt;/P&gt;
&lt;P&gt;Set BlockDef_GetByName = acBlk&lt;BR /&gt;Set acBlk = Nothing&lt;/P&gt;
&lt;P&gt;ExitHere:&lt;BR /&gt;Exit Function&lt;BR /&gt;ErrHandler:&lt;BR /&gt;Select Case Err.Number&lt;BR /&gt;Case 0&lt;BR /&gt;Case -2145386476 'block not in blocks&lt;BR /&gt;'Debug.Print Err.Number, Err.description, "BlkInBlkCollection Error"&lt;BR /&gt;Case Else&lt;BR /&gt;Debug.Print Err.Number, Err.description, "BlockDef_GetByName Error"&lt;BR /&gt;End Select&lt;BR /&gt;GoTo ExitHere&lt;/P&gt;
&lt;P&gt;End Function&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 14:26:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/anonymous-block-replace-or-rename-with-a-named-block/m-p/8554362#M19799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-28T14:26:13Z</dc:date>
    </item>
  </channel>
</rss>

