AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

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

Recreate multiple hatch boundaries at once

8919 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: 22,244
Registered: ‎11-06-2003
Message 2 of 10 (8,917 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 (8,907 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: 22,244
Registered: ‎11-06-2003
Message 4 of 10 (8,874 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
murray-clack
Posts: 1,798
Registered: ‎12-08-2003
Message 5 of 10 (8,869 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
fiorenontaglio
Posts: 2
Registered: ‎04-24-2012
Message 6 of 10 (7,567 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: 315
Registered: ‎07-30-2008
Message 7 of 10 (7,520 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 E5-1620 v2 @ 3.70 GHz
Nvidia Quadro K4000
32.0 GB RAM
New Member
fiorenontaglio
Posts: 2
Registered: ‎04-24-2012
Message 8 of 10 (7,514 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,312
Registered: ‎04-09-2010
Message 9 of 10 (5,637 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.
Active Contributor
3dwannab
Posts: 26
Registered: ‎06-18-2012
Message 10 of 10 (1,989 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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.