<?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: Cannot Delete Duplicate Objects in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8145162#M102219</link>
    <description>&lt;P&gt;DannyNL what is this?&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jul 2018 20:43:14 GMT</pubDate>
    <dc:creator>scarroll</dc:creator>
    <dc:date>2018-07-20T20:43:14Z</dc:date>
    <item>
      <title>Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8141936#M102210</link>
      <description>&lt;P&gt;I am new to LISP and was hoping someone could help with this issue I have.&amp;nbsp; I have a large and complex 3D design with overlapping identical 3D blocks.&amp;nbsp; Is there any way to scan through the content of the file and delete the duplicate 3D blocks all at once.&amp;nbsp; OVERKILL does not work and it would take way too long to manually delete the duplicates.&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are scaffold tubes modeled in 3D blocks with basic construction lines to allow for snap points.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 16:50:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8141936#M102210</guid>
      <dc:creator>scarroll</dc:creator>
      <dc:date>2018-07-19T16:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8142892#M102211</link>
      <description>&lt;P&gt;Please upload sample.dwg&amp;nbsp;&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, 19 Jul 2018 23:01:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8142892#M102211</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2018-07-19T23:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143274#M102212</link>
      <description>&lt;P&gt;Can you clarify what you mean by duplicate blocks?&lt;/P&gt;&lt;P&gt;Because in your question you mention 'overlapping' as well as 'duplicate'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To me duplicate suggests two blocks with the same name and inserted on exactly the same insertion point. If so, this would not be too difficult to program. If they do not share the same insertion point but actually only partially overlap, this will be a lot more difficult.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 07:02:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143274#M102212</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-07-20T07:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143939#M102213</link>
      <description>&lt;P&gt;They are the same block inserted in the same way on the same insertion point.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:51:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143939#M102213</guid>
      <dc:creator>scarroll</dc:creator>
      <dc:date>2018-07-20T12:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143949#M102214</link>
      <description>&lt;P&gt;please , upload a sample,dwg&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:55:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143949#M102214</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2018-07-20T12:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143964#M102215</link>
      <description>&lt;P&gt;I cant do that devitg.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:57:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8143964#M102215</guid>
      <dc:creator>scarroll</dc:creator>
      <dc:date>2018-07-20T12:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8144009#M102216</link>
      <description>I am pretty sure you can create a sample what is alowed to uploud.&lt;BR /&gt;&lt;BR /&gt;If not. We have the knowledge, you have the data, and now?&lt;BR /&gt;&lt;BR /&gt;There are not two identical blockreferences of one block.. but what is the difference?&lt;BR /&gt;Please select one double pair (= two) of blockreferences, use command LIST and post the result [F2].&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jul 2018 13:10:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8144009#M102216</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2018-07-20T13:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8144182#M102217</link>
      <description>&lt;P&gt;Try this.....not mother's finest, but had to hurry since my weekend is on.&lt;/P&gt;&lt;P&gt;So also only limited tested&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only blocks that match ALL properties from the list (RBD_PropertyList) will be deleted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:RemBlkDup (/ RBD_Selection RBD_BlockInsertion RBD_PointList RBD_PropertyList RBD_MainValueList RBD_CheckValueList RBD_DeleteList)
   (if
      (setq RBD_Selection (ssget "_X" (list '(0 . "INSERT")(cons 410 (getvar "CTAB")))))
      (progn
         (foreach RBD_Item (ssnamex RBD_Selection)
            (setq RBD_BlockInsertion (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-get-InsertionPoint (setq RBD_BlockObject (vlax-ename-&amp;gt;vla-object (cadr RBD_Item)))))))
            (if
               (not (setq RBD_PointFound (assoc RBD_BlockInsertion RBD_PointList)))               
               (setq RBD_PointList (cons (list RBD_BlockInsertion RBD_BlockObject) RBD_PointList))
               (setq RBD_PointList (subst (append RBD_PointFound (list RBD_BlockObject)) RBD_PointFound RBD_PointList))
            )
         )
         (setq RBD_PropertyList
            (list
               "EffectiveName"           "InsertionPoint"          "Rotation"                "XEffectiveScaleFactor"
               "XScaleFactor"            "YEffectiveScaleFactor"   "YScaleFactor"            "ZEffectiveScaleFactor"
               "ZScaleFactor"
            )
         )
         (foreach RBD_PointItem RBD_PointList
            (foreach RBD_Block (cdr RBD_PointItem)
               (if
                  (not (vl-position RBD_Block RBD_DeleteList))
                  (progn
                     (setq RBD_MainValueList (mapcar '(lambda (RBD_Property) (if (= (type (setq RBD_Value (vlax-get-property RBD_Block RBD_Property))) 'VARIANT) (vlax-safearray-&amp;gt;list (vlax-variant-value RBD_Value)) RBD_Value)) RBD_PropertyList))
                     (foreach RBD_CheckBlock (cddr RBD_PointItem)
                        (setq RBD_CheckValueList (mapcar '(lambda (RBD_Property) (if (= (type (setq RBD_Value (vlax-get-property RBD_Block RBD_Property))) 'VARIANT) (vlax-safearray-&amp;gt;list (vlax-variant-value RBD_Value)) RBD_Value)) RBD_PropertyList))
                        (if
                           (not (vl-some 'null (mapcar '(lambda (RBD_MainValue RBD_CheckValue) (equal RBD_MainValue RBD_CheckValue)) RBD_MainValueList RBD_CheckValueList)))
                           (setq RBD_DeleteList (cons RBD_CheckBlock RBD_DeleteList))
                        )
                     )
                  )
               )
            )
         )
         (if
            RBD_DeleteList
            (progn
               (vla-StartUndoMark (vla-get-ActiveDocument (vlax-get-acad-object)))
               (foreach RBD_Block RBD_DeleteList
                  (vla-Delete RBD_Block)
               )
               (vla-EndUndoMark (vla-get-ActiveDocument (vlax-get-acad-object)))
            )
         )
      )
   )
   (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2018 14:08:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8144182#M102217</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-07-20T14:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8145160#M102218</link>
      <description>&lt;P&gt;CADffm I cannot give you a dwg due to my companies policies, but here is the results from my LIST with two duplicates on the same snap point:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command: LIST&lt;BR /&gt;2 found&lt;/P&gt;&lt;P&gt;BLOCK REFERENCE Layer: "SLH70"&lt;BR /&gt;Space: Model space&lt;BR /&gt;Handle = 5bc&lt;BR /&gt;Block Name: "SLH70"&lt;BR /&gt;Anonymous Name: "*U22"&lt;BR /&gt;at point, X= 33.5438 Y= 9.0186 Z= 12.0177&lt;BR /&gt;X scale factor: 1.0000&lt;BR /&gt;Y scale factor: 1.0000&lt;BR /&gt;rotation angle: 0&lt;BR /&gt;Z scale factor: 1.0000&lt;BR /&gt;InsUnits: Millimeters&lt;BR /&gt;Unit conversion: 0.0394&lt;BR /&gt;Scale uniformly: No&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 20:42:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8145160#M102218</guid>
      <dc:creator>scarroll</dc:creator>
      <dc:date>2018-07-20T20:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8145162#M102219</link>
      <description>&lt;P&gt;DannyNL what is this?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 20:43:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8145162#M102219</guid>
      <dc:creator>scarroll</dc:creator>
      <dc:date>2018-07-20T20:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8150474#M102220</link>
      <description>&lt;P&gt;What is what?&lt;/P&gt;&lt;P&gt;You are asking for a LISP to remove duplicate blocks and that is what that code is for&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 06:09:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8150474#M102220</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-07-24T06:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8151315#M102221</link>
      <description>&lt;P&gt;&lt;SPAN&gt;So, we are on the right path! Thank you very much for your help!! I tried the code you wrote and it is deleting the duplicates but its also deleting some items all together and some duplicate components remain. Is it possible to include with in the code 'if qty&amp;gt;1' to remove those components? &amp;nbsp; Could you help with these two items in the coding? &amp;nbsp; Thanks once again &lt;/SPAN&gt;for all your help DannyNL!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 12:02:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8151315#M102221</guid>
      <dc:creator>scarroll</dc:creator>
      <dc:date>2018-07-24T12:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8168282#M102222</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3144455"&gt;@DannyNL&lt;/a&gt;Any luck with what I had brought up last post?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 17:12:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8168282#M102222</guid>
      <dc:creator>scarroll</dc:creator>
      <dc:date>2018-07-31T17:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8169416#M102223</link>
      <description>&lt;P&gt;I've been quite busy the last weeks and did not have time to monitor the forum each day, so I'd missed your last question. But the code should do exactly as you are requesting and should only remove duplicates and leave one (so the qty&amp;gt;1 is already in effect).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT is does check on all those properties as included in the code and if one of those properties does not match, it will not be considered a duplicate.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It is also difficult to test a routine with no example drawing from your side. I know you'd mentioned you are not able to provide one, but that does mean I need to create one myself and with those the code does work. So I'm not able to tell why in your case it sometimes works and sometimes it doesn't, without being able to check the blocks/objects on which the routine fails.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 06:37:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/8169416#M102223</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-08-01T06:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/9714331#M102224</link>
      <description>&lt;P&gt;Hi Sir, I have the same issue, multiple blocks in the same base point but different names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to kill duplicate blocks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 06:28:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/9714331#M102224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-27T06:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/10007676#M102225</link>
      <description>&lt;P&gt;Hi Danny&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help.&lt;/P&gt;&lt;P&gt;Is it possible to recode your LISP a bit to find and delete duplicated hatches not blocks ? I'm too new in coding to make it myself.&lt;/P&gt;&lt;P&gt;Hathes are made by same boudary, could be in same or different layers and colours. They are not visible often cause have same hatch style and angle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;BRegards&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 13:51:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/10007676#M102225</guid>
      <dc:creator>karpki</dc:creator>
      <dc:date>2021-01-17T13:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/13647030#M102226</link>
      <description>&lt;P&gt;It doesn't seem to be responding to "rotation" If the blocks have the same insertion point and one is at 0 rotation, one at 270, one at 180 and one at 90 it deletes 3 and leaves only one. It should leave them all as they are at different rotations.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 18:39:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/13647030#M102226</guid>
      <dc:creator>kirkwj</dc:creator>
      <dc:date>2025-05-23T18:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Delete Duplicate Objects</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/13647043#M102227</link>
      <description>&lt;P&gt;Have you considered using selection cycling?&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 18:59:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cannot-delete-duplicate-objects/m-p/13647043#M102227</guid>
      <dc:creator>lee.pellegrin</dc:creator>
      <dc:date>2025-05-23T18:59:27Z</dc:date>
    </item>
  </channel>
</rss>

