AutoCAD 2010/2011/2012

Reply
Active Member
frdn
Posts: 6
Registered: ‎11-10-2010
Message 1 of 10 (7,473 Views)

Recreate multiple hatch boundaries at once

7473 Views, 9 Replies
11-18-2010 04:11 PM

I have a lot hatches with no boundary around. i need recreate boundaries of these hatches but it take too late time doing it. i know that is possible but don't know how! plz help me. i am an intermediate in autocad.

*Expert Elite*
pendean
Posts: 20,295
Registered: ‎11-06-2003
Message 2 of 10 (7,471 Views)

Re: Recreate multiple hatch boundaries at once

11-18-2010 04:18 PM in reply to: frdn

HATCHEDIT command has a RECREATE BOUNDARY button, explore it.

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Active Member
frdn
Posts: 6
Registered: ‎11-10-2010
Message 3 of 10 (7,461 Views)

Re: Recreate multiple hatch boundaries at once

11-18-2010 05:10 PM in reply to: pendean

I know that. I mean I want do this for many hatches at once because i want save a lot time of recreate hatch boundaries. with hatchedit command you able do this for one hatch. i guess that be done by script writing or that will be possible with a sidelong software.

help plz

*Expert Elite*
pendean
Posts: 20,295
Registered: ‎11-06-2003
Message 4 of 10 (7,428 Views)

Re: Recreate multiple hatch boundaries at once

11-19-2010 05:10 AM in reply to: frdn

You will have to customize with Lisp (or a menu macro) using the -HATCHEDIT (note the dash) command.

 

Customization Discussion area if you need help:
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/bd-p/130

 

What and see if anyone here has one already written they can share.

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
*Pro
Posts: 1,788
Registered: ‎12-08-2003
Message 5 of 10 (7,423 Views)

Re: Recreate multiple hatch boundaries at once

11-19-2010 05:45 AM in reply to: pendean

Here you go.  I just wrote it real quick. It seems to work ok.

 

 

;;;Recreate-Hatch-Boundaries.lsp written by Murray Clack, November 19, 2010
;;;This routine will recreate boundaries around multiple selected hatch patterns and makes the patterns associative
(prompt "\nRecreate-Hatch-Boundaries.lsp loaded, Enter RHB to execute")
(defun c:RHB (/ OLDCE SSET CNT OBJ)
  (setq OLDCE (getvar "cmdecho"))
  (setvar "cmdecho" 0)
  (princ "\nSelect Hatch Objects: ")
  (setq SSET (ssget))
  (setq CNT -1)
  (while (setq OBJ (ssname SSET (setq CNT (1+ CNT))))
(command "-hatchedit" OBJ "b" "p" "y")
 )
(setvar "cmdecho" OLDCE)
(princ)
)

 

New Member
Posts: 2
Registered: ‎04-24-2012
Message 6 of 10 (6,121 Views)

Re: Recreate multiple hatch boundaries at once

04-24-2012 04:30 PM in reply to: frdn

Hi, i extended the previous code with these features:

- creates associative boundary
- assigns the same hatch color to the boundary
- creates the boundary on the same layer the hatch entity belongs

 

it's here:

http://furiousgis.blogspot.it/2012/04/autocad-recreate-boundaries-around-all.html

 

bye

Mentor
ArchD
Posts: 311
Registered: ‎07-30-2008
Message 7 of 10 (6,074 Views)

Re: Recreate multiple hatch boundaries at once

05-04-2012 12:24 PM in reply to: fiorenontaglio

How about selecting all the individual hatches, then right click and choose "Generate Boundary"?

Archie Dodge

Civil 3D 2013
Windows 7 64-bit
Xeon W3550 3.07 GHz
Nvidia Quadro 4000
12.0 GB RAM
New Member
Posts: 2
Registered: ‎04-24-2012
Message 8 of 10 (6,068 Views)

Re: Recreate multiple hatch boundaries at once

05-04-2012 01:16 PM in reply to: ArchD
You can do that (I cannot find the command right-clicking, I need to type "_HATCHGENERATEBOUNDARY" on the commandline). However my goal was slightly more than this: - recreate the boundaries with the same hatch source colour - recreate the boundaries on the same hatch source layer or in a "cloned empty layer" named something like "myLayer_boundaries"
Mentor
JamaL9722060
Posts: 1,284
Registered: ‎04-09-2010
Message 9 of 10 (4,191 Views)

Re: Recreate multiple hatch boundaries at once

04-03-2013 04:08 AM in reply to: murray-clack

 

Great murray-clack! I love this command

 

Best

 

Jamal

----------------------------------------------------------
Jamal NUMAN, GIS and Civil Engineer, MSc
e-mail: JamaL9722060@yahoo.com
P.O.Box: 731, Ramallah, West Bank, Palestine.
----------------------------------------------------------
Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.
Contributor
Posts: 22
Registered: ‎06-18-2012
Message 10 of 10 (543 Views)

Re: Recreate multiple hatch boundaries at once

03-06-2014 06:35 AM in reply to: murray-clack

Hi thnak you.. Was wondering how to put new voundary to existing layer "Defpoints"

 

My attempt:

;;;Recreate-Hatch-Boundaries.lsp written by Murray Clack, November 19, 2010
;;;This routine will recreate boundaries around multiple selected hatch patterns and makes the patterns associative
(prompt "\nHatch-Recreate-Boundaries.lsp loaded, Enter 'Hatch_Recreate_Boundaries' to execute")
(defun c:Hatch_Recreate_Boundaries (/ OLDCE SSET CNT OBJ)
  (setq OLDCE (getvar "cmdecho"))
  (setvar "cmdecho" 0)
  (princ "\nSelect Hatch Objects: ")
  (setq SSET (ssget))
  (setq CNT -1)
  (while (setq OBJ (ssname SSET (setq CNT (1+ CNT))))
(command "-hatchedit" OBJ "b" "p" "y")
(command "_change" CNT "P" "LA" "Defpoints" "")
 )
 
(setvar "cmdecho" OLDCE)
(princ)
)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OS: Windows 7 Ultimate x64 CPU: i7 CPU 965 @ 3.20GHz RAM: Crosair 12288 MBytes DDR3 GPU: ATI Radeon HD 4870 X2 MONITOR: 32" HP LP3065 LCD
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Freelance CAD and 3d Architectural Visual Artist: stephensherry147@yahoo.co.uk

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube