<?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: Hatch merge/split, in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/11111953#M146302</link>
    <description>&lt;P&gt;Why, after changing the color/s of multiple hatches, the function mergeHatch does not work?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="220418175624_idx0008.jpg" style="width: 471px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1055920i0908C5BFAE48F411/image-size/large?v=v2&amp;amp;px=999" role="button" title="220418175624_idx0008.jpg" alt="220418175624_idx0008.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Command: q2
Select objects: Specify opposite corner: 7 found

ColorCalc[1.yes/0.no]=1
Current active settings:  Color Layer Ltype Ltscale Lineweight Thickness 
PlotStyle Dim Text Hatch Polyline Viewport Table Material Shadow display 
Multileader
Point-of-Areas.dic?
EndT&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2022 14:43:42 GMT</pubDate>
    <dc:creator>diagodose2009</dc:creator>
    <dc:date>2022-04-18T14:43:42Z</dc:date>
    <item>
      <title>Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3823971#M146279</link>
      <description>&lt;P&gt;Hatch merge/split,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got a lisp file that does merge two existing hatching into one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;But the issue is that in case of overlapping hatches the code does merge the hatches BUT it subtracts the overlapping area of the two hatches!&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What I wanted is to merge them and to keep the overlapping area as a part of the result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I couldn’t find any lisp file that split an existing hatch based on multiple existing lines&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2013 21:01:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3823971#M146279</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-04-04T21:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3824092#M146280</link>
      <description>&lt;P&gt;Would you , please &amp;nbsp;upload , or send it off line, a sample DWG with such&amp;nbsp;&lt;SPAN&gt;hatches&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2013 23:43:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3824092#M146280</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2013-04-04T23:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3824240#M146281</link>
      <description>&lt;P&gt;Many thanks devitg for the help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the attached screenshots (and also the dwg file)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I wanted to merge the overlapping hatches (indicated on the screenshot)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I wanted to split the hatch based on an existing line(indicated on the screenshot)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 07:10:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3824240#M146281</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-04-05T07:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3849005#M146282</link>
      <description>&lt;P&gt;I’m attaching another example in which the hatches are erased as the lisp command “merge hatch” is applied&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What might be the issue here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dwg file and lisp file are attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2013 08:24:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3849005#M146282</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-04-11T08:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3856517#M146283</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/586963"&gt;@JamaL9722060&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;I’m attaching another example in which the hatches are erased as the lisp command “merge hatch” is applied&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What might be the issue here?&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hatch entity data is extraordinarily complicated, so it's hard even to analyze where everything is coming from, much less how to put it together from several patterns into one, but one thing I noticed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A Hatch pattern made by either selecting internal points&amp;nbsp;or closed objects will have a DXF code &lt;STRONG&gt;91&lt;/STRONG&gt; value, or a &lt;STRONG&gt;NumberOfLoops&lt;/STRONG&gt; VLA property,&amp;nbsp;equal to the number of boundaries.&amp;nbsp; The long skinny through-the-middle Hatch in your sample drawing was made from&amp;nbsp;&lt;EM&gt;7&lt;/EM&gt; boundaries, and the remaining three were made from single boundaries.&amp;nbsp; That suggests to me that the overall merged pattern should have a DXF 91/NumberOfLoops value of 7 + 1 + 1 + 1 = &lt;EM&gt;10&lt;/EM&gt;.&amp;nbsp; But it looks like the code assigns a value equal to the number of patterns selected to merge, which would be&amp;nbsp;&lt;EM&gt;4&lt;/EM&gt; in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I drew two Hatch patterns, each involving a &lt;EM&gt;single&lt;/EM&gt; defining boundary, MergeHatch worked, which suggested to me that maybe that DXF 91/NumberOfLoops element could be the issue.&amp;nbsp; But when I tried merging the three Hatches in your drawing that have single defining boundaries, omitting the one with 7, they were all deleted just as when that 7-loop one was included, so apparently that is not &lt;EM&gt;all&lt;/EM&gt; of the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2013 13:53:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3856517#M146283</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2013-04-11T13:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3857512#M146284</link>
      <description>&lt;P&gt;Many thanks Kent for the very useful elaboration,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then a lisp file that can do which is described in the next link sounds to be impossible!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Merging-hatches-that-have-gabs-and-or-overlaps/td-p/3857103" target="_blank"&gt;http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Merging-hatches-that-have-gabs-and-or-overlaps/td-p/3857103&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 08:18:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3857512#M146284</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-04-12T08:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3863508#M146285</link>
      <description>&lt;P&gt;Jamal,&lt;BR /&gt;I've done a code to merge hatches, it was made a few years ago, the problem is, I can't find it!!!&lt;BR /&gt;So, I wrote this code, on the fly, it will merge overlapping hatches, it is not a fast code, because it uses multiple commands, but works.&lt;BR /&gt;Try it, is minimally tested...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:test (/ ss zer ss1 hpb olde itm ent bou ss2)
  (alert
    "\n            Select hatch to Merge.\n\nFirst one will be the Properties Source."
  )
  (if (setq ss (ssget ":L" '((0 . "HATCH"))))
    (progn
      (command "_.undo" "_BE")
      (setq olde (getvar 'cmdecho)
	    hpb	 (getvar 'hpbound)
	    itm	 -1
	    ss1	 (ssadd)
	    zer	 (entlast)
      )
      (ssadd zer ss1)
      (setvar 'hpbound 0)
      (setvar 'cmdecho 0)
      (while
	(setq ent (ssname ss (setq itm (1+ itm))))
	 (command ".-hatchedit" ent "b" "r" "y")
      );; while
      (while
	(setq zer (entnext zer))
	 (ssadd zer ss1)
      );; while
      (ssdel (ssname ss1 0) ss1)
      (command "_.union" ss1 "")
      (setq bou (entlast))
      (command "_.hatch" "solid" "l" "")
      (setq ss2 (ssget "_L"))
      (command "_.copy"
	       (ssname ss 0)
	       ""
	       "0,0,0"
	       "0,0,0"
	       "_.erase"
	       "p"
	       ""
	       "_.matchprop"
	       "L"
	       ss2
	       ""
	       "_.draworder"
	       ss2
	       ""
	       "b"
	       "_.erase"
	       "L"
	       bou
	       ss
	       ""
      )
    );; progn
  );; if
  (command "_.undo" "_E")
  (setvar 'hpbound hpb)
  (setvar 'cmdecho olde)
  (princ)
);; test&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;hope that helps&lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 20:00:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3863508#M146285</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2013-04-12T20:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3870650#M146286</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very much appreciated Henrique for the help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lisp file that you have generously shared is great but still includes unexpected behavior&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the attached dwg file I got 7 hatches that I wanted to merge and then to draw a boundary for them (using another lisp file (attached).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is attached. Two boundaries are created! While it is assumed to be one as the hatches are assumed to merged to be one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the issue then?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2013 10:41:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3870650#M146286</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-04-13T10:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3870932#M146287</link>
      <description>Jamal,&lt;BR /&gt;as I wrote in my previous post, "will merge overlapping hatches"..&lt;BR /&gt;In your example the seven hatches are forming two distinct zones, and both zones are coincident only in one point, so it is impossible to define an common area to the two hatch zones, would be require at least two common points, or an overlap area, for the resulting boundary be only one.&lt;BR /&gt;&lt;BR /&gt;Henrique</description>
      <pubDate>Sat, 13 Apr 2013 11:10:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3870932#M146287</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2013-04-13T11:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3871357#M146288</link>
      <description>&lt;P&gt;Very much appreciated Henrique for the elaboration,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got your point. Now it is clearer how the lisp works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My idea was concerning the possibility to create hatch if the gab between selected hatches (that are aimed to be merged) is within a particular tolerance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, in the attached screenshot, I’m dreaming to have a lips file that merges selected hatches in that manner (to create hatches where the gab is less than the tolerance)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2013 17:55:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3871357#M146288</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-04-14T17:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3871396#M146289</link>
      <description>&lt;P&gt;Hi Jamal,&lt;/P&gt;&lt;P&gt;I understand your idea, but it would not be easy to create a tool that would merge hatches with a gap between them, mainly because to ensure that the final boundary would be desired, it would be almost impossible,&lt;/P&gt;&lt;P&gt;Jamal, in the example you attached, it would be possible to create a code to find a vertex coincident to both boundaries, and the two nearest points from the both boundaries, and then generate a new boundary, but your example is not the general case, many times, hatch boundaries may have very different shapes, and in that case it would be very difficult to create a tool that was reliable for all situations...&lt;/P&gt;&lt;P&gt;See the example I have attached, I think that exemplifies what I tried to say.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2013 20:42:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3871396#M146289</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2013-04-14T20:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3872382#M146290</link>
      <description>&lt;P&gt;Many thanks Henrique for the prompt help and the elaboration&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do agree&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lisp file you have provided is fantastic and does do the job&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 22:04:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3872382#M146290</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-04-15T22:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3872403#M146291</link>
      <description>You're welcome, Jamal&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Henrique</description>
      <pubDate>Mon, 15 Apr 2013 22:39:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3872403#M146291</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2013-04-15T22:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3908552#M146292</link>
      <description>&lt;P&gt;Hi Henrique,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How about a lisp file that can split an existing hatch?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2013 16:39:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3908552#M146292</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-05-05T16:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3908678#M146293</link>
      <description>Hi Jamal,&lt;BR /&gt;I never done anything to split an existing hatch, but let's see if I can think in a way to do it...&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Henrique</description>
      <pubDate>Sun, 05 May 2013 17:11:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3908678#M146293</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2013-05-05T17:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3908680#M146294</link>
      <description>&lt;P&gt;Thanks Henrique&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2013 17:25:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3908680#M146294</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-05-05T17:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3909841#M146295</link>
      <description>&lt;P&gt;Jamal,&lt;BR /&gt;as I said:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"I never done anything to split an existing hatch, but let's see if I can think in a way to do it..."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how I can split an existing hatch, this code is not bullet-proof, is only a demo, and was made to try to demonstrate a way to get the hatch split...&lt;BR /&gt;Try it, is minimally tested...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:test (/ c e hpb itm olde p pts selp ss ss1 ss2 ss3)
  (prompt "\nSelect the lines to split hatch: ")
  (if (setq ss (ssget ":L" '((0 . "LINE,LWPOLYLINE,ARC"))))
    (progn
      (prompt "\nSelect the hatch to split: ")
      (if (setq ss1 (ssget ":S:L" '((0 . "HATCH"))))
	(progn
	  (command "_.undo" "_BE" "_ucs" "_W" "_plan" "")
	  (setq	olde (getvar 'cmdecho)
		hpb  (getvar 'hpbound)
		selp (getvar 'selectionpreview)
		itm  -1
		fuzz 0.25)
	  (command ".-hatchedit" (ssname ss1 0) "_b" "_r" "_y"
		   "._extrude" "_L" "" "5")
	  (while
	    (setq e (ssname ss (setq itm (1+ itm))))
	     (command "._imprint" "_L" e "n" "")
	     (setq c (vlax-ename-&amp;gt;vla-object e)
	           p (vlax-curve-getpointatdist
		      c
		      (/ (vlax-curve-getdistatparam c (vlax-curve-getendparam c))
			 2.
		      )
		    )
		   pts (cons p pts)
		   p (polar p (* pi 0.25) fuzz)
		   pts (cons p pts)
		   p (polar p (* pi 1.25) fuzz)
		   pts (cons p pts)
		   ))
	  );; while
	  (command "._explode" "_L" "")
	  (setq	ss2 (ssget "_P")
		ss3 (ssget "_F" pts '((0 . "REGION"))))
	  (command "._erase" ss2 "_R" ss3 "")
	  (setq itm -1)
	  (while
	    (setq e (ssname ss3 (setq itm (1+ itm))))
	     (command "_.hatch"	"solid" e ""
		      "_.matchprop" ss1 "_L" ""
		      "_.draworder" "_L" "" "_B")
	  );; while
	  (command "erase" ss1 ss3 "")
	);; progn
      );; if
    );; progn
  );; if
  (setvar 'hpbound hpb)
  (setvar 'selectionpreview selp)
  (setvar 'cmdecho old)
  (command "_ucs" "_P" "_zoom" "_P"  "_.undo" "_E")
  (princ)
);; test&lt;/PRE&gt;&lt;P&gt;hope that helps&lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 10:32:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3909841#M146295</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2013-05-06T10:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3910710#M146296</link>
      <description>&lt;P&gt;Many thanks Henrique!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sounds not to work. It is added to the “load application” but doesn’t appear on the commands list (attached)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What might be the issue?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 20:25:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3910710#M146296</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-05-06T20:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3910733#M146297</link>
      <description>&lt;P&gt;Jamal,&lt;/P&gt;&lt;P&gt;the code I posted, &lt;SPAN&gt;had a&lt;/SPAN&gt; &lt;SPAN&gt;extra&lt;/SPAN&gt; &lt;SPAN&gt;bracket...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try the attached one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Henrique&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 20:43:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3910733#M146297</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2013-05-06T20:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hatch merge/split,</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3910758#M146298</link>
      <description>&lt;P&gt;Many thanks Henrique for the effort. It works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very much appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 21:08:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatch-merge-split/m-p/3910758#M146298</guid>
      <dc:creator>JamaL9722060</dc:creator>
      <dc:date>2013-05-06T21:08:12Z</dc:date>
    </item>
  </channel>
</rss>

