Jump to content

Recreate hatch Boundary of Multiple hatches


nod684

Recommended Posts

hello CADTutor, i want to recreate the boundary of multiple hatches and the re-created boundary should adopt the correspondin layer of the hatches.

 

I tried using the HATCHGENERATEBOUNDARY command but it uses the current layer as the layer for the boundary for all the hatches

 

kindly see attached example file...

recreate hatch boundary.dwg

Link to comment
Share on other sites

Use a different program rather than the inbuilt command like hatchB.lsp you could edit it to use hatch object layer.

 

;;; HATCHB.LSP ver 2.1

;;; Recreates hatch boundary by selecting a hatch

;;; Boundary is created in current layer/color/linetype in WCS

;;; Known problem with some elipses and splines

;;; By Jimmy Bergmark

;;; Copyright © 1997-2004 JTB World, All Rights Reserved

;;; Website: www.jtbworld.com

Link to comment
Share on other sites

Use a different program rather than the inbuilt command like hatchB.lsp you could edit it to use hatch object layer.

 

;;; HATCHB.LSP ver 2.1

;;; Recreates hatch boundary by selecting a hatch

;;; Boundary is created in current layer/color/linetype in WCS

;;; Known problem with some elipses and splines

;;; By Jimmy Bergmark

;;; Copyright © 1997-2004 JTB World, All Rights Reserved

;;; Website: www.jtbworld.com

 

Thanks Bigal, i have tried this also but this one also uses the current layer as a boundary..

Link to comment
Share on other sites

;;; HATCHB.LSP ver 2.5
;;; Recreates hatch boundary by selecting a hatch
;;; Known problem with some elipses and splines
;;; By Jimmy Bergmark
;;; Copyright (C) 1997-2008 JTB World, All Rights Reserved
;;; Website: [url="http://www.jtbworld.com"]www.jtbworld.com[/url]
;;; E-mail: [email="info@jtbworld.com"]info@jtbworld.com[/email]
;;; 2000-02-12 - First release
;;; 2000-03-27 - Counterclockwise arc's and ellipse's fixed
;;;              Objects created joined to lwpolyline if possible
;;;              Error-handling, undo of command
;;;              Can handle PLINETYPE = 0,1,2
;;; 2000-03-30 - Integrating hatchb and hatchb14
;;;              Selection of many hatches
;;;              Splines supported if closed.
;;; 2001-04-02 - Fixed bug with entmake of line with no Z for r14
;;; 2001-07-31 - Removed an irritating semicolon to enable polylines to be created.
;;; 2001-10-04 - Changed mail and homepage so it's easy to find when new versions comes up.
;;; 2003-02-06 - Minor fix
;;; 2003-02-17 - Area returned if no islands is found since it's not consistant
;;; 2003-05-19 - Fix to take PEDITACCEPT variable used in AutoCAD 2004 into account
;;; 2004-11-05 - Minor bugs fixed
;;; 2006-03-18 - Nothing changed from 2.1 other that it's been confirmed to work with AutoCAD 2007
[b];;; 2006-05-13 - Create the boundary on the same layer as the hatch using the hbl command [/b] and
;;;              on current layer/color/linetype using the hb or hatchb command
;;; 2007-02-08 - Fixed a bug with the hbl command
;;; 2008-02-29 - Support for hatches in non WCS thanks to xiaocai
;;; Tested on AutoCAD r14, 2000, 2000i, 2002, 2004, 2005, 2006, 2007, 2008, 2009

 

 

Problem solved. i wasn't reading!

my bad!

 

 

;;; 2006-05-13 - Create the boundary on the same layer as the hatch using

the hbl command

Link to comment
Share on other sites

nod684,

 

Try the attached - I sympathize entirely with your IT pain!

 

[ATTACH]53912[/ATTACH]

 

Cheers,

 

Thanks a lot its working!

Link to comment
Share on other sites

  • 5 years later...

 

Having trouble with the attached BulkRHB.lsp 

Using in 2019.  GO through commands and in the end says objects are not in the current space.

 

Thanks,

SS

Link to comment
Share on other sites

For hatches not associated with a boundary this will recreate the boundary segments on the hatches layer but requires Express Tools installed.

;;; ReAssHatch.lsp requires Hatchutil.lsp which came with Express Tools.
;;; Add boundaries & reassociate them to a selection of Hatch entities.
;;; by: Tom Beauford
;;; BeaufordT@LeonCountyFL.gov
;;; LEON COUNTY PUBLIC WORKS ENGINEERING SECTION
(defun c:ReAssHatch ( / ss e# ent)
  (setq ss (ssget '((0 . "HATCH")(71 . 0)))
        e# (sslength ss)
  )
  (if(not acet-hatch-remake)(load "Hatchutil"))
  (repeat e#
    (setq e# (- e# 1))
    (acet-hatch-remake (ssname ss e#))
    (entdel (ssname ss e#))
  )
  (princ)
)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...