<?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: Exploded Hatch Delete in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833221#M51060</link>
    <description>&lt;P&gt;I already know the basics. I didn't even have to do a few tries. I am also encountering an error for the first time.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 08:39:19 GMT</pubDate>
    <dc:creator>k005</dc:creator>
    <dc:date>2021-12-20T08:39:19Z</dc:date>
    <item>
      <title>Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833087#M51054</link>
      <description>&lt;P&gt;Hello guys&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I delete Exploded Hatch objects that are within a boundary?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample file is attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 06:53:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833087#M51054</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T06:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833118#M51055</link>
      <description>&lt;P&gt;Since boundary is also exploded it will take same amount of time to run a lisp or erase hatch remains. Automatic entity erase may result with removing boundary polylines.&lt;/P&gt;
&lt;P&gt;If you don't have hatch remains with horizontal or vertical polylines one can create a list that will take all polylines whose angle between start point and endpoint is not 0 90 or variations.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 07:24:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833118#M51055</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-12-20T07:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833149#M51056</link>
      <description>&lt;P&gt;Generally, as in the example I gave...&lt;/P&gt;&lt;P&gt;borders are not polylines.&lt;/P&gt;&lt;P&gt;0 and 90 degrees are correct. It may be different, but that's how it usually is.&lt;/P&gt;&lt;P&gt;We do not process those with different angles.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 07:44:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833149#M51056</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T07:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833162#M51057</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537692"&gt;@k005&lt;/a&gt;&amp;nbsp;&amp;nbsp; Try this, It may work for you. Not fully tested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:dhr ( / rad_to_deg ss i eo ang)
(defun rad_to_deg (rad)(* 180.0 (/ rad pi)))
(setq ss (ssget '((0 . "LWPOLYLINE")(90 . 2))))
(setq i -1)
(while (&amp;lt; (setq i (1+ i)) (sslength ss))
(setq eo (vlax-ename-&amp;gt;vla-object (ssname ss i)))
(setq ang (rtos(rad_to_deg(angle (vlax-curve-getStartpoint eo)(vlax-curve-getEndpoint eo))) 2 0))
(if(not(member ang '("0" "90" "180" "270"))) (entdel (ssname ss i)))
)
(princ)
)&lt;/LI-CODE&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>Mon, 20 Dec 2021 08:40:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833162#M51057</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-12-20T08:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833193#M51058</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it will... but I got an error load lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; error: misplaced dot on input&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:32:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833193#M51058</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T08:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833213#M51059</link>
      <description>&lt;P&gt;Edited under #4.&amp;nbsp; A space was missing between&amp;nbsp; ."LWPOLYLINE". That is the reason you should learn at least basics of autolisp, so you can check for basic errors.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:37:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833213#M51059</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-12-20T08:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833221#M51060</link>
      <description>&lt;P&gt;I already know the basics. I didn't even have to do a few tries. I am also encountering an error for the first time.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:39:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833221#M51060</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T08:39:19Z</dc:date>
    </item>
    <item>
      <title>Ynt: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833225#M51061</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one word, Super! thank you very much.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:41:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833225#M51061</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T08:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833539#M51062</link>
      <description>&lt;P&gt;I don't understand.&amp;nbsp; Exploding a Hatch pattern results in Lines, not Polylines.&amp;nbsp; What's really happening to get you to your "before" condition?&amp;nbsp; It would be easy to delete all Hatch patterns on a particular Layer, or with a particular color override, or of a particular pattern, if you eliminate the Exploding.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 12:57:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833539#M51062</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-12-20T12:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833951#M51063</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes of course. it is much easier as you say without blasting. I agree here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now border lines and hatching are done on the same layer. This is trouble. Layered not worked....&lt;/P&gt;&lt;P&gt;and sometimes it may be necessary to explode it...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is how it is... Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:13:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10833951#M51063</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834006#M51064</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537692"&gt;@k005&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;.... border lines and hatching are done on the same layer. This is trouble. Layered not worked....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So whom do you need to tell to not put the border lines and Hatching on the same Layer, to eliminate that trouble?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does "Layered not worked" mean?&amp;nbsp; Explain in more detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And nothing there explains how you ended up with a lot of little Polylines where presumably there were Hatch patterns -- that is not what you get from from Exploding Hatch patterns, which means something else is happening.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:48:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834006#M51064</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-12-20T16:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834012#M51065</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, you can't tell this to anyone.&lt;/P&gt;&lt;P&gt;"What does "Layered not worked" mean? Explain in more detail. "&lt;/P&gt;&lt;P&gt;that is, these projects are sent to us. we cannot criticize it as "you didn't work here with layers". There are many different situations. some projects may seem layered...&lt;/P&gt;&lt;P&gt;In short, there is no standard like what you say, unfortunately. The working logics within the project are variable.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:54:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834012#M51065</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T16:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834079#M51066</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Friend;&lt;/P&gt;&lt;P&gt;The example I sent had LWPOLYLINE.&lt;/P&gt;&lt;P&gt;Can we add LINE to this part? Sometimes when Scan is Exploded, LINE can also happen...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(setq ss (ssget '((0 . "LWPOLYLINE")(90 . 2))))&lt;/LI-CODE&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>Mon, 20 Dec 2021 17:27:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834079#M51066</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T17:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834193#M51067</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537692"&gt;@k005&lt;/a&gt;&amp;nbsp; Try this&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:dhr ( / rad_to_deg ss i eo ang)
	(defun rad_to_deg (rad)(* 180.0 (/ rad pi)))
	(setq ss (ssget '((0 . "LWPOLYLINE,LINE"))))
	(setq i -1)
	(while (&amp;lt; (setq i (1+ i)) (sslength ss))
		(setq eo (vlax-ename-&amp;gt;vla-object (ssname ss i)))
		(cond
			((= (vlax-get eo 'ObjectName) "AcDbPolyline")	
				(cond 
					((= (length (vlax-get eo 'Coordinates)) 4)
						(setq ang (rtos(rad_to_deg(angle (vlax-curve-getStartpoint eo)(vlax-curve-getEndpoint eo))) 2 0))
						(if(not(member ang '("0" "90" "180" "270"))) (entdel (ssname ss i)))
					)
				)
			)	
			((= (vlax-get eo 'ObjectName) "AcDbLine")	
				(setq ang (rtos(rad_to_deg(angle (vlax-curve-getStartpoint eo)(vlax-curve-getEndpoint eo))) 2 0))
				(if(not(member ang '("0" "90" "180" "270"))) (entdel (ssname ss i)))
			)
		)
	)
	(princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Dec 2021 18:24:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834193#M51067</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-12-20T18:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834208#M51068</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one word, Super. It was very nice.&lt;/P&gt;&lt;P&gt;Thank you my friend.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 18:28:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834208#M51068</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-20T18:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834219#M51069</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537692"&gt;@k005&lt;/a&gt;&amp;nbsp; You're welcome! &lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 18:31:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834219#M51069</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-12-20T18:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834349#M51070</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537692"&gt;@k005&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;The example I sent had LWPOLYLINE.&lt;/P&gt;
&lt;P&gt;.... Sometimes when Scan is Exploded, LINE can also happen...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here's another approach.&amp;nbsp; It filters the selection to allow only Lines or single-line-segment open LWPolylines, so when it's stepping through the selection [if any such things were selected], there's no need to check for those characteristics depending on which object type each one is -- it needs to look only at the angle.&amp;nbsp; And for that, it just checks whether there's any non-zero remainder when the angle is divided by 90°, working directly with the radian values without the need to convert to degrees.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:RAL ; = Remove Angled [poly]Lines
  (/ ss n ent)
  (if
    (setq ss
      (ssget '(
        (-4 . "&amp;lt;OR")
          (0 . "LINE")
          (-4 . "&amp;lt;AND")
            (0 . "LWPOLYLINE")
            (-4 . "&amp;lt;NOT") (-4 . "&amp;amp;") (70 . 1) (-4 . "NOT&amp;gt;"); open only
            (90 . 2); 2 vertices only
            (42 . 0); line segment only
          (-4 . "AND&amp;gt;")
        (-4 . "OR&amp;gt;")
      )) ; filter list &amp;amp; ssget
    ); setq
    (repeat (setq n (sslength ss)); then
      (setq ent (ssname ss (setq n (1- n))))
      (if
        (not ; not orthogonal?
          (equal
            (rem
              (angle (vlax-curve-getStartPoint ent) (vlax-curve-getEndPoint ent))
              (/ pi 2); 90° divisor
            ); rem
            0 1e-4
          ); equal
        ); not
        (entdel ent); then -- remove it
      ); if
    ); repeat
  ); if
  (princ)
); defun&lt;/LI-CODE&gt;
&lt;P&gt;[You can collapse a lot of the lines and remove commentary, to shorten it -- I left it expanded for clarity of what's going on.]&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 19:53:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10834349#M51070</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-12-20T19:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exploded Hatch Delete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10835080#M51071</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much, it's ok. &lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 04:56:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/exploded-hatch-delete/m-p/10835080#M51071</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2021-12-21T04:56:02Z</dc:date>
    </item>
  </channel>
</rss>

