how to combine hatch?

how to combine hatch?

Anonymous
Not applicable
141,237 Views
25 Replies
Message 1 of 26

how to combine hatch?

Anonymous
Not applicable

thx

0 Likes
Accepted solutions (3)
141,238 Views
25 Replies
Replies (25)
Message 2 of 26

gotphish001
Advisor
Advisor

Don't think it's a built in command unless it was added. I use this autolisp.

 

 



Nick DiPietro
Cad Manager/Monkey

Message 3 of 26

john.vellek
Alumni
Alumni
Accepted solution

Hi @Anonymous,

 

Can you give me a better idea of what you are trying to do with the hatches? I don't know of a way to JOIN hatches but you could perhaps use Group or block to get them to "stick" together.

 

An alternative is to move one hatch, erase the other and then re-select the boundaries and apply a single hatch. Then you can match the original hatch.

 

Please show me an example of what you are trying to create.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 4 of 26

john.vellek
Alumni
Alumni

HI @Anonymous,

 

Did the lisp provided by @gotphish001 resolve the hatch issue or did the more manual approach I suggested do the trick?

 

Please add a post with the status of your issue.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 5 of 26

Anonymous
Not applicable
Accepted solution

Thank you for sharing your problem with the community.

I think when you apply multiple hatching in the same area it will combine easily and it is easy to apply the hatch on an area and for hatching, you should use command HATCH then select the area where you want to hatch and repeat the same process again then you will get the desired output which you want.

Hope the above information may help you!! 

Message 6 of 26

mrteng
Participant
Participant
Accepted solution
Use HATCHGENERATEBOUNDARY , it will create polylines for selected hatches , then use hatch command and select generated polylines , uncheck separate hatched box ,it will generate one hatch for all areas .
Hope this can help you .
Message 7 of 26

amandahgmartins
Participant
Participant

it doesn't work for mac

 

Can someone help me?

Screen Shot 2018-09-12 at 11.58.04.png

Message 8 of 26

Patchy
Mentor
Mentor

It doesn't work for mac, because Mac can't use it.

Use autocad for windows.

Message 9 of 26

amandahgmartins
Participant
Participant

Well... I think I wasn't clear.

Is there any lisp that can merge hatches FOR MAC?

 

I have a MAC, not windows.

Message 10 of 26

pendean
Community Legend
Community Legend
Message 11 of 26

kevin.golding
Observer
Observer

Hi All,

 

I'm trying to do this too, but only becuase I'm wondering if a hatch will fix my problem.

 

I've got two construction boundaries, one is approved, the other is a nice to have... and I want to splice them both to create one boundary taking the outermost areas. I tried merging the hatch, and then recreating the boundary but that then just created two boundaries which is what I had at the start. Any ideas?

 

The blue line is what I am trying to achieve. ie, to merge two closed polylines.

 

merge.JPG

 

0 Likes
Message 12 of 26

Anonymous
Not applicable

STEP 1:

type generateboundary and select all hatches at once.

STEP 2:

erase/move singular hatches (you can type selectsimilar and move/erase them)

STEP 3:

type hatch and se (select objects)

STEP 4:

Select all boundaries created at step 1 at once.

 

This method is quick enough for me.

 

Message 13 of 26

parthEPKDL
Observer
Observer
solid hatch not Merge
Message 14 of 26

harrimanevan
Participant
Participant

This definitely helped, thank you! Love this HATCHGENERATEBOUNDARY tool : )

0 Likes
Message 15 of 26

john.uhden
Mentor
Mentor

@gotphish001 ,

That is a masterpiece by By Juan Villarreal.  Just what I needed for merging adjacent hatches of impervious surfaces lest I miss any when taking off areas.

John F. Uhden

0 Likes
Message 16 of 26

cgh6VFSY
Explorer
Explorer

Hatchgenerate boundary is all well and fine (and works in some instances) but as it can only do one by one, it is more or less sureless. Surely there must be a smarter way? I have a staircase here of 5 storeys and someone have decided to have each step into a hatch. I want to select all orange (in this case) as they are all interconnected and that would work in all other cad software but not in autocad?

0 Likes
Message 17 of 26

pendean
Community Legend
Community Legend

@cgh6VFSY wrote:

...and that would work in all other cad software but not in autocad?


Which CAD software is that? It might be worth switching to it if this is a dire business need.

 

 


@cgh6VFSY wrote:

...I have a staircase here of 5 storeys and someone have decided to have each step into a hatch...


Did you get a chance to ask the person that created a hatch-per-step to redo it for you? Or you can do so, just remember to turn off the variable HPSEPARATE first (usage is explained in HELP).

 

Confirm please; you are looking to have separate hatches become one like this below, correct? As in all gaps and separations between then are irrelevant.

pendean_0-1727712838953.png

 

0 Likes
Message 18 of 26

cgh6VFSY
Explorer
Explorer
I would switch in a heartbeart if it was up to me but lets be more positive and productive. Rhino, microstation, revit (more or less) are some examples but, even if not pure cad, adobe illustrator as well that allows import and export of DWGs.

I know how to separate a hatch into several ones (and also trim, that my colleague didnt know and was very grateful) but it should be possible join overlapping hatches. All my colleagues mainly give up hatches all together but I find it quite important in architectural drawings so I want to be able to sort it out.

As for the person that gave me the file, I believe it is beside the point but no, they seem to have exported the elevations and plans directly from Revit. Although it is another product from autocad, I thought it would work a bit better together but I have also experienced in another project that important autocad into Revit is not as smooth as it should be.

My intention is not to troll or to bash Autocad but it is just very frustrating to work in it with its limitations regarding primarily hatches.
0 Likes
Message 19 of 26

pendean
Community Legend
Community Legend

@cgh6VFSY wrote:
....they seem to have exported the elevations and plans directly from Revit....

That would have been good to know in your first post: you have a REVIT export query really. Not many over here can help you there. This looks to be a very similar topic in a REVIT forum at another site https://www.revitforum.org/forum/revit-architecture-forum-rac/architecture-and-general-revit-questio... 

 


@cgh6VFSY wrote:
...but it should be possible join overlapping hatches...

Not sure how separate 'steps' with hatches overlap but... There are many LISP tools created by many users to do just that (again, more info you added), none of which are discussed in the one post you landed in, but can be found in many others. LISP exists to expand the core abilities. I'll get you started with your search here, try many, if you find one close but not quite there, do to the LISP forum (not this forum) and ask for help expanding on it

https://www.google.com/search?q=autocad+lisp%3A+combine+overlapping+hatches 

https://www.google.com/search?q=autocad+lisp%3A+merge+overlapping+hatches 

 

HTH

0 Likes
Message 20 of 26

DesignerGuy1961
Participant
Participant

I use this LISP routine.

 

;; © Juan Villarreal 11.20.2011 ;;
;; massoc (Jaysen Long) ;;
;; Minor Modification by Jvillarreal ;;
;; Extracts info from list by key ;;
;; Found @ http://www.theswamp.org/index.php?topic=40149.0
(defun massoc (key alist / x nlist)
(foreach x alist
(if
(eq key (car x))
(setq nlist (cons x nlist))
)
)
(reverse nlist)
);defun
(defun c:MergeHatch ( / hentinfo ss i ent ent# seedpt# entinfo entinfo2 ent# seedpt# seedpts MergedHatchList)
(while (/= (cdr (assoc 0 hentinfo)) "HATCH")
(setq hentinfo (car (entsel "\nSelect Hatch Pattern to use:")))
(If hentinfo (setq hentinfo (entget hentinfo)) (princ "\nMissed. Try again.")))
(while (not ss) (princ "\nSelect hatch entities to merge:")(setq ss (ssget '((0 . "HATCH")))))
(setq MergedHatchList
(list (cons 0 "HATCH")
(cons 100 "AcDbEntity")
(assoc 8 hentinfo)
(cons 100 "AcDbHatch")
(assoc 10 hentinfo)
(assoc 210 hentinfo)
(assoc 2 hentinfo)
(assoc 70 hentinfo)
(assoc 71 hentinfo)
(cons 91 (sslength ss))
) i -1 seedpt# 0 ent# 0)
(repeat (sslength ss)
(setq n -1
entinfo (entget (ssname ss (setq i (1+ i))))
entinfo2 (member (assoc 92 entinfo) entinfo)
entinfo2 (reverse (cdr (member (assoc 75 entinfo2)(reverse entinfo2))))
ent# (+ ent# (cdr (assoc 91 entinfo)))
seedpt# (+ seedpt# (cdr (assoc 98 entinfo)))
seedpts (append seedpts (cdr (member (assoc 98 entinfo) entinfo)))
MergedHatchList (append MergedHatchList entinfo2)
)
(entdel (ssname ss i))
)
(setq MergedHatchList (subst (cons 91 ent#)(assoc 91 MergedHatchList) MergedHatchList)
MergedHatchList
(append MergedHatchList
(append
(reverse (cdr (member (assoc 98 hentinfo)(reverse (member (assoc 75 hentinfo) hentinfo)))))
(cons (cons 98 seedpt#) seedpts))))
(if (= (cdr (assoc 71 hentinfo)) 1)(setq MergedHatchList (append MergedHatchList '((-3 ("ACAD" (1010 0.0 0.0 0.0)))))))
(entmake MergedHatchList)
(setq ent (entlast))
(if (= (cdr (assoc 71 hentinfo)) 1)
(mapcar
'(lambda (x / entlist)
(setq entlist (entget (cdr x)))
(entmod (subst (cons 330 ent) (assoc 330 entlist) entlist))
)
(massoc 330 MergedHatchList)
)
)
)
(defun c:MH () (c:MergeHatch))

0 Likes