@JamaL9722060 wrote:
I’m attaching another example in which the hatches are erased as the lisp command “merge hatch” is applied
What might be the issue here?
....
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:
A Hatch pattern made by either selecting internal points or closed objects will have a DXF code 91 value, or a NumberOfLoops VLA property, equal to the number of boundaries. The long skinny through-the-middle Hatch in your sample drawing was made from 7 boundaries, and the remaining three were made from single boundaries. That suggests to me that the overall merged pattern should have a DXF 91/NumberOfLoops value of 7 + 1 + 1 + 1 = 10. But it looks like the code assigns a value equal to the number of patterns selected to merge, which would be 4 in this case.
When I drew two Hatch patterns, each involving a single defining boundary, MergeHatch worked, which suggested to me that maybe that DXF 91/NumberOfLoops element could be the issue. 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 all of the problem.
Kent Cooper, AIA