<?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: Clean-up drawing in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12108918#M32580</link>
    <description>&lt;P&gt;I've added your routine to the beginning of my macro which now looks like this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;^C^C&lt;FONT color="#FF0000"&gt;(while (setq ss (ssget "_X" (list '(0 . "INSERT") (cons 410 (getvar 'ctab))))) (initcommandversion) (command "_.explode" ss ""))&lt;/FONT&gt;;^C^C&lt;FONT color="#99CC00"&gt;(if (setq ss (ssget "_X" '((0 . "WIPEOUT")(410 . "Model"))))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#99CC00"&gt;(command "_.erase" ss "")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#99CC00"&gt;)&lt;/FONT&gt;;^C^C_CHPROP;ALL;;LA;0;C;BYBLOCK;LT;BYBLOCK;LW;BYBLOCK;T;0;;-OVERKILL;ALL;;O;0.000001;I;N;P;D;N;B;Y;Y;T;Y;E;Y;A;Y;D;-PURGE;A;*;N;AUDIT;Y;ZOOM;E;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure there are more elegant ways of achieving same results but works well enough. Thanks for help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2023 09:54:29 GMT</pubDate>
    <dc:creator>thebeesnees</dc:creator>
    <dc:date>2023-07-18T09:54:29Z</dc:date>
    <item>
      <title>Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12101521#M32570</link>
      <description>&lt;P&gt;I'm looking to create a simple one-click drawing cleanup routine (macro/lisp) that includes all the actions below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Select all blocks and explode (including nested blocks) - &lt;FONT color="#3366FF"&gt;&lt;EM&gt;I use QSELECT for this and have to perform multiple times to explode any nested blocks.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Delete all wipeouts - &lt;FONT color="#3366FF"&gt;&lt;EM&gt;I use QSELECT to perform this function&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Select all items, place on Layer 0 and change all properties to BYBLOCK - &lt;FONT color="#3366FF"&gt;&lt;EM&gt;I use CHPROP command&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Delete all duplicate/overlapping objects - &lt;EM&gt;&lt;FONT color="#3366FF"&gt;I use OVERKILL command&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. Fix any drawing errors - &lt;FONT color="#3366FF"&gt;&lt;EM&gt;I use AUDIT command&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;6. Zoom extents and save drawing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to solve items 3-6 but have no idea how to convert QSELECT functions into macro format. My macro so far is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;^C^C_CHPROP;ALL;;LA;0;C;BYBLOCK;LT;BYBLOCK;LW;BYBLOCK;T;0;;-OVERKILL;ALL;;O;0.000001;I;N;P;D;N;B;Y;Y;T;Y;E;Y;A;Y;D;-PURGE;A;*;N;AUDIT;Y;ZOOM;E;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 10:02:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12101521#M32570</guid>
      <dc:creator>thebeesnees</dc:creator>
      <dc:date>2023-07-14T10:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12101896#M32571</link>
      <description>&lt;P&gt;Have you looked into the SSX command?&amp;nbsp;&lt;A href="https://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-386ADF5E-C709-4940-8DB4-909C2760A23F" target="_blank"&gt;https://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-386ADF5E-C709-4940-8DB4-909C2760A23F&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 13:36:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12101896#M32571</guid>
      <dc:creator>TheCADnoob</dc:creator>
      <dc:date>2023-07-14T13:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12101905#M32572</link>
      <description>&lt;P&gt;It makes for a long macro, but some AutoLisp functions can be used in them.&amp;nbsp; This should [minimally tested in a macro] Explode all Blocks in the current space, and all nested Blocks coming from them, etc., until there are no Insert objects left to Explode:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(while (setq ss (ssget "_X" (list '(0 . "INSERT") (cons 410 (getvar 'ctab))))) (initcommandversion) (command "_.explode" ss ""))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are XREF's a possibility?&amp;nbsp; They would also be seen by that selection, but Exploding is not applicable.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 13:37:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12101905#M32572</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-07-14T13:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106152#M32573</link>
      <description>&lt;P&gt;Thanks, although not really sure how SSX command is useful in this instance?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 07:54:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106152#M32573</guid>
      <dc:creator>thebeesnees</dc:creator>
      <dc:date>2023-07-17T07:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106432#M32574</link>
      <description>&lt;P&gt;Not?&lt;/P&gt;
&lt;P&gt;You want to create selections by objecttype or objectproperties,&lt;/P&gt;
&lt;P&gt;ssx is the only command (commandline-only) you can do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But pure Lisp is better in your case, see Kents answer.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 10:12:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106432#M32574</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2023-07-17T10:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106658#M32575</link>
      <description>&lt;P&gt;I simply want to select all blocks, including nested blocks, and explode them - how do I achieve this using SSX?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 12:06:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106658#M32575</guid>
      <dc:creator>thebeesnees</dc:creator>
      <dc:date>2023-07-17T12:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106735#M32576</link>
      <description>&lt;P&gt;Why do you want to explode a block?&amp;nbsp; Some blocks can be exploding but if you have multiple times that block is used in the drawing, you can't just edit to correct all of them at once.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 12:45:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12106735#M32576</guid>
      <dc:creator>cadpro78</dc:creator>
      <dc:date>2023-07-17T12:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12107109#M32577</link>
      <description>&lt;P&gt;The whole point of cleaning a file is to remove as much unnecessary information as possible thus block definitions, layers, etc are not required and need to be purged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once cleaned the file will be inserted into a master file, becoming a block, usually acting as an underlay for our own drawing work. There is no intention to manipulate these files thus block definitions no longer serve a purpose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 15:19:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12107109#M32577</guid>
      <dc:creator>thebeesnees</dc:creator>
      <dc:date>2023-07-17T15:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12107216#M32578</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/82179"&gt;@thebeesnees&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The whole point of cleaning a file is to remove as much unnecessary information as possible thus block definitions ... are not required and need to be purged.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.... block definitions no longer serve a purpose.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;They do still serve a purpose, in memory savings.&amp;nbsp; One of the primary reasons for Blocks is that the information about all the pieces inside them is stored &lt;EM&gt;only once&lt;/EM&gt;, in the Block definition, and Insertions of them need only insertion point, scale factors, rotation and Layer, but don't need to hold information about all the details of all the pieces within them at ever insertion.&amp;nbsp; When you Explode the Blocks, all those separate pieces that were in all those Block insertions now have all their information [Layers, locations of endpoints and centers and vertices and so on, radii, text content, etc., etc.] all stored in the drawing file separately and independently and unnecessarily repeatedly.&amp;nbsp; If Blocks are complex and/or there are a lot of them, that will significantly bloat the file size.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 16:00:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12107216#M32578</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-07-17T16:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12108850#M32579</link>
      <description>&lt;P&gt;I agree in principle however in this instance I am trying keep our own drawing file as clean as possible.&lt;/P&gt;&lt;P&gt;We don't want all the layers, objects, block definitions from an imported drawing cluttering our files hence "cleaning" them first. The cleaned file is inserted is a block and just acts as a discrete underlay, usually placed on a grey layer.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 09:16:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12108850#M32579</guid>
      <dc:creator>thebeesnees</dc:creator>
      <dc:date>2023-07-18T09:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12108918#M32580</link>
      <description>&lt;P&gt;I've added your routine to the beginning of my macro which now looks like this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;^C^C&lt;FONT color="#FF0000"&gt;(while (setq ss (ssget "_X" (list '(0 . "INSERT") (cons 410 (getvar 'ctab))))) (initcommandversion) (command "_.explode" ss ""))&lt;/FONT&gt;;^C^C&lt;FONT color="#99CC00"&gt;(if (setq ss (ssget "_X" '((0 . "WIPEOUT")(410 . "Model"))))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#99CC00"&gt;(command "_.erase" ss "")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#99CC00"&gt;)&lt;/FONT&gt;;^C^C_CHPROP;ALL;;LA;0;C;BYBLOCK;LT;BYBLOCK;LW;BYBLOCK;T;0;;-OVERKILL;ALL;;O;0.000001;I;N;P;D;N;B;Y;Y;T;Y;E;Y;A;Y;D;-PURGE;A;*;N;AUDIT;Y;ZOOM;E;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure there are more elegant ways of achieving same results but works well enough. Thanks for help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 09:54:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12108918#M32580</guid>
      <dc:creator>thebeesnees</dc:creator>
      <dc:date>2023-07-18T09:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12109282#M32581</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/82179"&gt;@thebeesnees&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... I am trying keep our own drawing file as clean as possible. We don't want all the layers, objects, block definitions from an imported drawing cluttering our files hence "cleaning" them first. ..&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There are plenty of routines around that will [for example] force everything in all Block definitions to Layer 0 and color ByLayer and so on, so you can get Layering "cleaned" without the memory waste of Exploding all Blocks.&amp;nbsp; In my opinion, a drawing is "cleaner" if &lt;EM&gt;exactly&amp;nbsp;repeated content&lt;/EM&gt; is contained in Block insertions instead of existing separately in all locations.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 12:58:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12109282#M32581</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-07-18T12:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Clean-up drawing</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12111299#M32582</link>
      <description>&lt;P&gt;Firstly, thanks for the feedback. Much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only contention I have, which may be based on my misunderstanding what affects drawing performance most, is that often blocks contained within drawings provided can be extremely inefficient. They are usually flattened exports from non-Autodesk 3D modelling software. This usually means large amounts of duplicated/overlapping objects which clearly impairs performance (anecdotally this appears to be the case).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Simply cleaning/optimising the drawing improves performance significantly and allows us to control the appearance better. Already getting positive feedback after implementing procedure in the office.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, thanks for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 08:14:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/clean-up-drawing/m-p/12111299#M32582</guid>
      <dc:creator>thebeesnees</dc:creator>
      <dc:date>2023-07-19T08:14:13Z</dc:date>
    </item>
  </channel>
</rss>

