<?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: Explode, delete &amp;amp; change colour in modelspace &amp;amp; all viewports in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/explode-delete-amp-change-colour-in-modelspace-amp-all-viewports/m-p/8734964#M89847</link>
    <description>&lt;P&gt;Thanks, I appreciate your help.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2019 17:44:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-04-16T17:44:38Z</dc:date>
    <item>
      <title>Explode, delete &amp; change colour in modelspace &amp; all viewports</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/explode-delete-amp-change-colour-in-modelspace-amp-all-viewports/m-p/8732240#M89845</link>
      <description>&lt;P&gt;I am trying to get same code that will explode dimensions, hatches, etc, then delete leftover hatches that cannot not exploded, send the wipeouts to back &amp;amp; then change colour &amp;amp; layer of everything.&amp;nbsp; I need this done in all drawing, in &lt;U&gt;&lt;STRONG&gt;BOTH modelspace and paperspace across multiple layouts&lt;/STRONG&gt;&lt;/U&gt;. I tried something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(if (setq ss (ssget "_X" '((0 . "DIMENSION,LEADER,MTEXT,HATCH"))))&lt;BR /&gt;(repeat (setq i (sslength ss))&lt;BR /&gt;(setq ename (ssname ss (setq i (1- i))))&lt;BR /&gt;(command "_.explode" ename)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;(if (setq ss (ssget "_X" '((0 . "HATCH"))))&lt;BR /&gt;(repeat (setq i (sslength ss))&lt;BR /&gt;(setq ename (ssname ss (setq i (1- i))))&lt;BR /&gt;(command "_.erase" ename "")&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;(if (setq ss (ssget "_X" '((0 . "WIPEOUT"))))&lt;BR /&gt;(command "_.draworder" ss "" "")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(if (setq ss (ssget "_X")) &lt;BR /&gt;(command "_.chprop" ss "" "_layer" "0" "_c" "7" "")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I keep getting the error: "1 was not in current space". Can anyone help?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:57:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/explode-delete-amp-change-colour-in-modelspace-amp-all-viewports/m-p/8732240#M89845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-15T20:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Explode, delete &amp; change colour in modelspace &amp; all viewports</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/explode-delete-amp-change-colour-in-modelspace-amp-all-viewports/m-p/8732398#M89846</link>
      <description>&lt;P&gt;You are trying to do something (probably erasing) an object that is not in the current space, i.e. erase an object in paperspace whilst you are in modelspace. This happens because you are using (ssget "_X") incorrectly. You need to specify the current space as part of the filter string &lt;BR /&gt;&lt;BR /&gt;(ssget "_X" ( list '(0 . "HATCH") (cons 410 (getvar 'ctab))))&lt;BR /&gt;&lt;BR /&gt;and put all your code inside a loop that iterates through each layout&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 22:37:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/explode-delete-amp-change-colour-in-modelspace-amp-all-viewports/m-p/8732398#M89846</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-04-15T22:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Explode, delete &amp; change colour in modelspace &amp; all viewports</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/explode-delete-amp-change-colour-in-modelspace-amp-all-viewports/m-p/8734964#M89847</link>
      <description>&lt;P&gt;Thanks, I appreciate your help.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 17:44:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/explode-delete-amp-change-colour-in-modelspace-amp-all-viewports/m-p/8734964#M89847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-16T17:44:38Z</dc:date>
    </item>
  </channel>
</rss>

