Show Hatch Text

Function Syntax sht
Current Version 1.0
Download ShowHatchTextV1-0.lsp
View HTML Version ShowHatchTextV1-0.html

Program Description

This program enables the user to clear the area of a hatch pattern surrounding selected single-line text (DText) and multiline text (MText) objects, or Text, MText and single-line & multiline attributes contained within selected primary & nested block references.

Upon issuing the command syntax sht (Show Hatch Text) at the AutoCAD command-line, the user is first prompted to make a selection of Text, MText and/or block references for which to clear the surrounding hatch pattern, and then to select the obscuring hatch to be modified.

Following valid selections, the program will proceed to generate new hatch boundaries surrounding every selected Text and MText object, and furthermore for every Text, MText or attribute object found within each selected block reference, and recursively any of these annotation objects encountered within any nested block references (nested to any depth).

In order to generate the appropriate hatch boundary for nested Text, MText or attributes, the program will recreate the nested object as a temporary primary object, before adding the new hatch boundary and finally deleting the temporary object. As a consequence of this method, the hatch must become disassociative when nested objects are processed by the program.

Finally, the program is compatible for use with Text, MText and single-line & multiline attributes as primary objects in the drawing, or found within standard or dynamic primary & nested block references; furthermore, these objects may be defined in any UCS construction plane.

Program Demonstration

Show Hatch Text Demo

In the above demonstration, the program is being used with multiline text (MText), single-line text (DText), an attributed block reference, and a block reference containing multiple nested block references with single-line text.

The red block reference on the left has been rotated & scaled, and contains the nested yellow block reference which has also been rotated & scaled; this yellow block reference in turn contains the nested green block reference which has been rotated & scaled, forming a compound scaling & rotation as we traverse up the levels of nesting.

Instructions for Running

Please refer to How to Run an AutoLISP Program.


increase · reset · decrease

Designed & Created by Lee Mac © 2010