Tip 1016: Changing the snap option for hatch lines
Did you know that you can snap to hatch lines and other objects if you want to, or change an AutoCAD setting and have OSNAP ignore all hatch lines if you prefer? The setting can be found in the Options dialog box (right-click in the work area, then choose Options from the shortcut menu), on the Drafting tab:
In the lower left corner, note that Ignore hatch objects has a check in the box. With this setting, the Object Snap tool (OSNAP) ignores all hatch objects–that is, it will not snap to them. If you uncheck the box, OSNAP will include hatch lines in looking for snapping opportunities.
This is very useful in many situations. Generally, keeping the Ignore hatch objects box checked will improve performance, and in most tasks I don’t need to snap to hatch objects. However, when I’m creating a ceiling plan that has a ceiling grid, I’ve found that it’s a real time saver to use a hatch pattern for the ceiling grid. I’ll go into this further in a later post.
If you prefer typing your commands, rather than going to the Options dialog box, here are the command line variables:
The “older” variable is OSNAPHATCH. OSNAPHATCH is described as “obsolete” in the AutoCAD help material, but it still works. Just type it into the command line, and choose a setting of 0 to disallow snapping to hatch lines. Choose a setting of 1 to allow snapping to hath lines. This is much easier to remember and use than the “newer” variable, which follows.
The newer variable that replaced OSNAPHATCH is OSOPTIONS. The settings here are more complicated. Here is an excerpt from the Help files:
Type: Bitcode Saved in: Registry Initial value: 3
Automatically suppresses object snaps on hatch objects and geometry with negative Z values when using a dynamic UCS.
The setting is stored as a bitcode using the sum of the following values:
Translated, that means that when setting the OSOPTIONS variable:
0 OSNAP snaps to hatch objects
1 OSNAP ignores hatch objects
2 OSNAP ignores objects with negative Z values
3 OSNAP ignores both hatch objects and objects with negative Z values
Notice that as far as 0 and 1 are concerned, these results are the opposite of the results that you got with 0 and 1 in the older OSNAPHATCH command. Just to make it more difficult for us command-line-entry CAD types. I’m usually not concerned with negative-Z objects, so I will continue to use the older OSNAPHATCH command as long as it works.
Hope this helps. Please send comments or your AutoCAD questions.
Happy CADDing! 🙂