Jump to content

Recommended Posts

Posted

Sometimes it happens that the command "generate border" of a hatch creates a broken border.

The built-in command in AutoCAD and the LISP command:

(vl-cmdf "HatchGenerateBoundary" (car (entsel)) "")

They work the same:

1. We invoke the command.

2. We choose hatching.

3. The program creates a hatch boundary that is in the current selection set.

 

Usually it's one border - and that's ok. Sometimes it is a border divided into segments. All border segments are in the active selection set.

How to capture this active set of border segments and enter it in the "Join" command?

The "create hatch boundary" command returns T, not a selection set.

 

Posted

This code required having Express Tools installed as it references it's Hatchutil.lsp but does the job pretty cleanly.

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

 

  • 2 years later...
Posted
On 12/6/2019 at 12:48 PM, tombu said:

This code required having Express Tools installed as it references it's Hatchutil.lsp but does the job pretty cleanly.

 

This has been an issue with me lately.

 

See attached the drawing file. There's an invisible hatch boundary in the hatch.

 

Here's what I found:

If I run that code for the file it creates an inner set of lines.

Then if I delete them inner line the hatch is still associative. Nioce!

Then  if you delete all the surrounding hatch lines and rerun the ReAssHatch command and the inner lines don't get created this time.

Invisible Boundary.dwg

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