Undocumented options in AutoCAD 2011’s Hatch command

The Hatch command was massively overhauled by Autodesk in AutoCAD 2011, making it very interactive via the ribbon. Some like it the instant results; some don't care for the sometimes unpredictable results.

(You can always switch back to the AutoCAD 2010 mode through the HpDlgMode system variable. Autodesk is usually pretty good at maintaining old features.)

As I update my Using AutoCAD 2011 book, I am finding that the new Hatch command has a number of hidden options. So far I have uncovered the following:

MA – Match Properties — makes the properties of the new pattern match those of an existing pattern.

OR – Origin — prompts you to pick a new origin for the hatch pattern.

(Both of these are normally access through the ribbon; macro writers can use them at the command line.)

Other settings are adjusted on the fly through transparent system variables. For instance, clicking the Annotative button toggles 'HpAnnotative at the command line.

In addition, AutoCAD makes use of these undocumented system variables:

HatchBoundSet reports the contents of the hatch boundary set (read-only):
0 – current viewport (default).
1 – existing set.

HatchCreation reports whether the Hatch command is active (read-only):
0 – hatching is not active (default).
1 – hatching is underway (Hatch command is active).

HatchType specifies the type of hatch pattern (read-only):
0 – predefined (default).
1 – user defined.
2 – custom.

HpLastPattern reports the name of the last hatch pattern used (read-only); “Ansi31” is the default.


Go to Source