• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD 2010/2011/2012 DWG Format

    Reply
    Active Member
    frdn
    Posts: 6
    Registered: ‎11-10-2010

    Recreate multiple hatch boundaries at once

    4214 Views, 8 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.

    Please use plain text.
    *Expert Elite*
    pendean
    Posts: 15,415
    Registered: ‎11-06-2003

    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 | RSS | Twitter | PINS
    Please use plain text.
    Active Member
    frdn
    Posts: 6
    Registered: ‎11-10-2010

    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

    Please use plain text.
    *Expert Elite*
    pendean
    Posts: 15,415
    Registered: ‎11-06-2003

    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 | RSS | Twitter | PINS
    Please use plain text.
    *Pro
    Posts: 1,735
    Registered: ‎12-08-2003

    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)
    )

     

    Please use plain text.
    New Member
    Posts: 2
    Registered: ‎04-24-2012

    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

    Please use plain text.
    Mentor
    ArchD
    Posts: 294
    Registered: ‎07-30-2008

    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
    Please use plain text.
    New Member
    Posts: 2
    Registered: ‎04-24-2012

    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"
    Please use plain text.
    Mentor
    JamaL9722060
    Posts: 1,123
    Registered: ‎04-09-2010

    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.
    Please use plain text.