CAD FORUM - TIPS & TRICKS | UTILITIES | DISCUSSION | BLOCKS | SUPPORT | HELP & ASSISTANCE
Over 1.123.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips, Civil tips, Fusion tips.
The new Beam calculator, Spirograph generator and Regression curves in the Converters section.
New AutoCAD 2027 commands and sys.variables
CAD tip # 10269:
Question
A
You can use the AutoCAD command HATCHGENERATEBOUNDARY to batch-edit multiple hatches and restore their (previously deleted) boundary curves in one go. This command is available since version 2011.
For older versions or possible customizations of the boundary-restore procedure you can also use the following LISP utility defining the new custom command HGB (save it as .LSP):
;like HATCHGENERATEBOUNDARY (<2011) (defun C:HGB ( / ss len n ename oosm ocmd) (setq ss (ssget '((0 . "HATCH")))) (setq len (sslength ss) n 0) (setq oosm (getvar "osmode") ocmd getvar "cmdecho")) (setvar "osmode" 0) (setvar "cmdecho" 0) (while (< n len) (setq ename (ssname ss n)) (command "_HATCHEDIT" ename "_B" "" "_Y") (setq n (1+ n)) ) (setvar "osmode" oosm) (setvar "cmdecho" ocmd) (sssetfirst ss ss) (princ) ); end HGB
ACAD
2.4.2015
13510×
this tip shared by ARKANCE experts applies to: AutoCAD ·
![CAD Forum - ARKANCE Community - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]](../common/arkance_186.png)

What is the ARKANCE Community?