- (defun C:OH () (C:OffsetHatch))
- (defun C:OffsetHatch (/ *h* *pt* [color=red]*dist*[/color] *b1* *b2*)
- (setq *h* (entsel "\nSelect Hatch to offset: ")); [be sure to select hatch object, not other kind of entity]
- (setq *pt* (getpoint "Specify point on side to offset: "))
- [color=red](setq *dist* (getdist "\nSpecify offset distance: "))[/color]
- (command "_.-HATCHEDIT" *h* "_B"; Rrecreate Boundary
- "_P"; Polyline, [sometimes autocad creates region]
- "_Y"; Yes
- )
- (setq *b1* (entlast)); boundary, [may be more than one boundary created]
- (command "_.OFFSET" [color=red]*[/color][color=red]dist*[/color] *b1* *pt* "")
- (setq *b2* (entlast))
- (command "_.-HATCHEDIT" *h* "_AD" "_S" *b2* "" "")
- (entdel *b1*)
- )
|