<?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 exploding certain entities in all block reference lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13428369#M1045</link>
    <description>&lt;P&gt;working from&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/any-lisp-to-delete-all-dimensions-from-the-files-including/m-p/13418351" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/any-lisp-to-delete-all-dimensions-from-the-files-including/m-p/13418351&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;i modified the codes to&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;sorry, i still don't understand&lt;BR /&gt;&lt;BR /&gt;basically i modified the codes to&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;(defun c:blitz2  (/ aDoc)
      (vl-load-com)
      (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
      (vlax-for blk (vla-get-blocks aDoc)
      (if
            (and
                  (eq :vlax-false (vla-get-isXref blk))
                  &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;;(eq :vlax-false (vla-get-isLayout blk))&lt;/STRONG&gt;&lt;/FONT&gt;
                  (not (wcmatch (vla-get-name blk) "`*D*"))
                  )
                 (vlax-for dim blk
                       (if (wcmatch
                                 (vla-get-ObjectName dim)
                                 "AcDb*Dimension")
                             (vla-explode dim))
                       )
                 )
            )
      (vla-regen aDoc acAllViewports)
      (princ)
      )&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;however, it doesn't work for dimensions entity&lt;BR /&gt;&lt;BR /&gt;after some experimenting, it works for polylines when i change&lt;BR /&gt;&lt;BR /&gt;"AcDb*Dimension")&lt;BR /&gt;&lt;BR /&gt;to&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;"AcDb*Polyline")&lt;BR /&gt;&lt;BR /&gt;can anyone help?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Apr 2025 05:14:16 GMT</pubDate>
    <dc:creator>Brian.TsaiF883G</dc:creator>
    <dc:date>2025-04-16T05:14:16Z</dc:date>
    <item>
      <title>exploding certain entities in all block reference lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13428369#M1045</link>
      <description>&lt;P&gt;working from&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/any-lisp-to-delete-all-dimensions-from-the-files-including/m-p/13418351" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/any-lisp-to-delete-all-dimensions-from-the-files-including/m-p/13418351&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;i modified the codes to&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;sorry, i still don't understand&lt;BR /&gt;&lt;BR /&gt;basically i modified the codes to&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;(defun c:blitz2  (/ aDoc)
      (vl-load-com)
      (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
      (vlax-for blk (vla-get-blocks aDoc)
      (if
            (and
                  (eq :vlax-false (vla-get-isXref blk))
                  &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;;(eq :vlax-false (vla-get-isLayout blk))&lt;/STRONG&gt;&lt;/FONT&gt;
                  (not (wcmatch (vla-get-name blk) "`*D*"))
                  )
                 (vlax-for dim blk
                       (if (wcmatch
                                 (vla-get-ObjectName dim)
                                 "AcDb*Dimension")
                             (vla-explode dim))
                       )
                 )
            )
      (vla-regen aDoc acAllViewports)
      (princ)
      )&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;however, it doesn't work for dimensions entity&lt;BR /&gt;&lt;BR /&gt;after some experimenting, it works for polylines when i change&lt;BR /&gt;&lt;BR /&gt;"AcDb*Dimension")&lt;BR /&gt;&lt;BR /&gt;to&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;"AcDb*Polyline")&lt;BR /&gt;&lt;BR /&gt;can anyone help?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 05:14:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13428369#M1045</guid>
      <dc:creator>Brian.TsaiF883G</dc:creator>
      <dc:date>2025-04-16T05:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: exploding certain entities in all block reference lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13428681#M1046</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9381051"&gt;@Brian.TsaiF883G&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Apparently&lt;/SPAN&gt; (vla-explode) function does not work on dimensions.&amp;nbsp;so to solved your request you need to copy the dimension by means of (vla-copyObjects) to model space and call (command "explode") collect all extracted objects and (vla-copyObjects) back to the block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 09:29:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13428681#M1046</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-04-16T09:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: exploding certain entities in all block reference lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13429407#M1047</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9381051"&gt;@Brian.TsaiF883G&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(vl-load-com); load activex support

(defun c:blitz2  (/ aDoc AcDbBlkTblRec AcDbEntity ename obj^ ctr lst)
 (setvar "cmdecho" 0)
 (command "._undo" "_begin")
  
 (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))

 (setq ctr 0)
 (vlax-for AcDbBlkTblRec (vla-get-blocks aDoc)
  (if (and
        (eq :vlax-false (vla-get-isXref AcDbBlkTblRec))
        (not (wcmatch (vla-get-name AcDbBlkTblRec) "`*Model_Space,`*Paper_Space[#],`*D*"))
      )
   (progn
    (setq ctr 0)
    (vlax-for AcDbEntity AcDbBlkTblRec
     (if (wcmatch (vla-get-ObjectName AcDbEntity) "AcDb*Dimension")
      (progn
       (setq ename (entlast) obj^ nil)
       (vlax-invoke aDoc 'CopyObjects (list AcDbEntity) (vla-get-ModelSpace aDoc)) ; copy to model space
       (command ".explode" (entlast))
       (while (setq ename (entnext ename))
	(setq obj^ (cons (vlax-ename-&amp;gt;vla-object ename) obj^))
       )
       (vlax-invoke aDoc 'CopyObjects obj^ AcDbBlkTblRec) ; copy/back to block

       (foreach o obj^
	(vla-delete o)
        (vlax-release-object o)
       ); foreach

       (vla-delete AcDbEntity) ; delete dimension
       (setq ctr (1+ ctr))
      ); progn
     ); if

     (vlax-release-object AcDbEntity)
    ); vlax-for
   ); progn
  ); if

  (if (&amp;gt; ctr 0)
   (setq lst (cons (cons (vla-get-name AcDbBlkTblRec) ctr) lst) ctr 0)
  )
  (vlax-release-object AcDbBlkTblRec)
 ); vlax-for
  
 (vla-regen aDoc acAllViewports)
 (vlax-release-object aDoc)

 (command "._undo" "_end")
 (setvar "cmdecho" 1)

 (if (not lst)
  (princ "\nNo nested dimensions found to explode.")
  (foreach item lst
   (princ (strcat "\nBlock \"" (car item) "\", " (itoa (cdr item)) " dimension(s) exploded."))
  )
 ); if
  
 (princ)
); c:blitz2&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 16 Apr 2025 16:06:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13429407#M1047</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-04-16T16:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: exploding certain entities in all block reference lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430279#M1048</link>
      <description>&lt;P&gt;Why are you so awesome? ~~~~&lt;BR /&gt;&lt;BR /&gt;Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 04:35:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430279#M1048</guid>
      <dc:creator>Brian.TsaiF883G</dc:creator>
      <dc:date>2025-04-17T04:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: exploding certain entities in all block reference lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430328#M1049</link>
      <description>&lt;P&gt;Now, I am trying to remove all "KS_BOLT" (non-autocad entity)&amp;nbsp; by replacing&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;  (if (wcmatch (vla-get-ObjectName AcDbEntity) "AcDb*Dimension")&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(if (wcmatch (vla-get-ObjectName AcDbEntity) "Ks_Bolt")&lt;BR /&gt;&lt;BR /&gt;KS_BOLT have the following info I extracted from 'VDumpit' from&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13429407#M481181" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13429407#M481181&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I am able to select the correct quantity of KS_BOLT but i cannot execute explode or erase command on those non-AutoCAD entities. Does it need some special codes for non_AutoCAD entities?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;;;;;;&lt;BR /&gt;Select Entity to Dump; IKs_ComBolt: IKs_ComBolt Interface&lt;BR /&gt;; Property values:&lt;BR /&gt;; Application (RO) = #&amp;lt;VLA-OBJECT IAcadApplication 00007ff726181e30&amp;gt;&lt;BR /&gt;; AreaClassName (RO) = ""&lt;BR /&gt;; BoltCoatingType = 2&lt;BR /&gt;; BoltDisplay = -1&lt;BR /&gt;; BoltMountingSpaceFootLength (RO) = 0.0&lt;BR /&gt;; BoltMountingSpaceFootWidth (RO) = 0.0&lt;BR /&gt;; BoltMountingSpaceHeadLength (RO) = 0.0&lt;BR /&gt;; BoltMountingSpaceHeadWidth (RO) = 0.0&lt;BR /&gt;; BoltPartlist = -1&lt;BR /&gt;; BoltStyleName = "8.8S-GALV"&lt;BR /&gt;; Count = 1&lt;BR /&gt;; CounterSunk = 0&lt;BR /&gt;; DetailStyleName (RO) = ""&lt;BR /&gt;; Diameter = 16.0&lt;BR /&gt;; DiskInnerDiameter = 18.0&lt;BR /&gt;; DiskOuterDiameter = 32.4&lt;BR /&gt;; DiskThick = 3.1&lt;BR /&gt;; DisplayClassName (RO) = ""&lt;BR /&gt;; Document (RO) = #&amp;lt;VLA-OBJECT IAcadDocument 000002811f8aea08&amp;gt;&lt;BR /&gt;; EntityTransparency = "ByLayer"&lt;BR /&gt;; FamilyClassName (RO) = ""&lt;BR /&gt;; FootThick = 16.0&lt;BR /&gt;; FreeDescriptionName (RO) = "NONE"&lt;BR /&gt;; GripMax (RO) = 174.0&lt;BR /&gt;; GripMin (RO) = 164.0&lt;BR /&gt;; Handle (RO) = "3F922"&lt;BR /&gt;; HasExtensionDictionary (RO) = 0&lt;BR /&gt;; HeadThick = 11.0&lt;BR /&gt;; Hyperlinks (RO) = #&amp;lt;VLA-OBJECT IAcadHyperlinks 0000028185511b98&amp;gt;&lt;BR /&gt;; Inbus = 0&lt;BR /&gt;; InsertPoint (RO) = (-451.0 2677.0 -5.65455e-13)&lt;BR /&gt;; ItemNumber = "025"&lt;BR /&gt;; KeySize = 27.0&lt;BR /&gt;; KlemmLength = 153.188&lt;BR /&gt;; Layer = "PS_BOLT"&lt;BR /&gt;; Length = 180.0&lt;BR /&gt;; LengthAddition = 0.0&lt;BR /&gt;; Linetype = "ByLayer"&lt;BR /&gt;; LinetypeScale = 1.0&lt;BR /&gt;; Lineweight = -1&lt;BR /&gt;; Material = "ByLayer"&lt;BR /&gt;; MaterialIndex = 3002&lt;BR /&gt;; MountingBolt = 0&lt;BR /&gt;; Name = "M16 x 180 8.8/S GALV"&lt;BR /&gt;; Note1 = ""&lt;BR /&gt;; Note2 = ""&lt;BR /&gt;; NutDisplay = -1&lt;BR /&gt;; NutPartlist = 0&lt;BR /&gt;; ObjectID (RO) = 150&lt;BR /&gt;; ObjectName (RO) = "Ks_Bolt"&lt;BR /&gt;; OwnerID (RO) = 71&lt;BR /&gt;; PalNutDisplay = 0&lt;BR /&gt;; PalNutPartlist = 0&lt;BR /&gt;; PartOrigin (RO) = 0&lt;BR /&gt;; PlotStyleName = "Color_4"&lt;BR /&gt;; PosNumber = ""&lt;BR /&gt;; SafetyNutKeySize = 0.0&lt;BR /&gt;; SafetyNutThick = 0.0&lt;BR /&gt;; ShipNumber = ""&lt;BR /&gt;; Tension = 0.0&lt;BR /&gt;; ThreadedRod = 0&lt;BR /&gt;; TotalCount (RO) = 0&lt;BR /&gt;; TrueColor = #&amp;lt;VLA-OBJECT IAcadAcCmColor 0000028185511c50&amp;gt;&lt;BR /&gt;; Visible = -1&lt;BR /&gt;; Washer2Display = 0&lt;BR /&gt;; Washer2Partlist = -1&lt;BR /&gt;; WasherDisplay = -1&lt;BR /&gt;; WasherPartlist = -1&lt;BR /&gt;; WedgeWasher2Display = 0&lt;BR /&gt;; WedgeWasher2Partlist = 0&lt;BR /&gt;; WedgeWasherDisplay = 0&lt;BR /&gt;; WedgeWasherPartlist = 0&lt;BR /&gt;; Weight (RO) = 0.381242&lt;BR /&gt;; Xaxis (RO) = (-0.0522163 0.998636 2.03474e-16)&lt;BR /&gt;; Yaxis (RO) = (-6.87954e-16 -2.39723e-16 1.0)&lt;BR /&gt;; Methods supported:&lt;BR /&gt;; ArrayPolar (3)&lt;BR /&gt;; ArrayRectangular (6)&lt;BR /&gt;; BuildName ()&lt;BR /&gt;; CalculateWeight (1)&lt;BR /&gt;; Copy ()&lt;BR /&gt;; Delete ()&lt;BR /&gt;; GetBoundingBox (2)&lt;BR /&gt;; GetExtensionDictionary ()&lt;BR /&gt;; GetInsertUcs (1)&lt;BR /&gt;; GetMidLineUcs (1)&lt;BR /&gt;; GetObjectDisplayMode ()&lt;BR /&gt;; GetXData (3)&lt;BR /&gt;; Highlight (1)&lt;BR /&gt;; IntersectWith (2)&lt;BR /&gt;; Mirror (2)&lt;BR /&gt;; Mirror3D (3)&lt;BR /&gt;; Move (2)&lt;BR /&gt;; RecomputeBoltLength ()&lt;BR /&gt;; RetrieveGeometry (1)&lt;BR /&gt;; Rotate (2)&lt;BR /&gt;; Rotate3D (3)&lt;BR /&gt;; ScaleEntity (2)&lt;BR /&gt;; SetObjectD&lt;BR /&gt;Select Entity to Dump&lt;BR /&gt;isplayMode (1)&lt;BR /&gt;; SetPartOrigin (1)&lt;BR /&gt;; SetXData (2)&lt;BR /&gt;; TransformBy (1)&lt;BR /&gt;; Turn ()&lt;BR /&gt;; Update ()&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 05:30:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430328#M1049</guid>
      <dc:creator>Brian.TsaiF883G</dc:creator>
      <dc:date>2025-04-17T05:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: exploding certain entities in all block reference lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430432#M1050</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9381051"&gt;@Brian.TsaiF883G&lt;/a&gt;&amp;nbsp;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Does it need some special codes for non_AutoCAD entities?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;before you rush to change the code with other objects first check it manually (try exploding them)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Custom AutoCAD objects need to support any functionality it needed and that's include the explode function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if you can not explode&amp;nbsp;KS_BOLT object then the programmer did not implement it&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 07:08:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430432#M1050</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-04-17T07:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: exploding certain entities in all block reference lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430439#M1051</link>
      <description>&lt;P&gt;Yes it can be exploded.&lt;BR /&gt;&lt;BR /&gt;i tried replacing line 22&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;  (command ".explode" (entlast))&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;to&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(command ".erase" (entlast))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it doesn't erase it at all&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 07:12:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploding-certain-entities-in-all-block-reference-lisp/m-p/13430439#M1051</guid>
      <dc:creator>Brian.TsaiF883G</dc:creator>
      <dc:date>2025-04-17T07:12:55Z</dc:date>
    </item>
  </channel>
</rss>

