CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 7132

CAD tip CAD tip # 13802:

   
Question CAD 
 %  platform  category 
Q - question

Dual-color hatches in AutoCAD.

A - answer By combining a user hatch pattern and a two-color hatch/background setting, you can use various striped and other two-color associative hatch fills in AutoCAD. No thickness settings are needed.

First, you will need the .PAT pattern file - you can use, for example, a pattern like this with sufficiently dense lines of a monochrome "stripe" hatch:

*DUOCOL, Double color
45, 0, 0, 0, 19.05 
45, 1.1225325, 0, 0, 19.05
45, 2.2450650, 0, 0, 19.05
45, 3.3675975, 0, 0, 19.05
45, 4.4901300, 0, 0, 19.05
45, 5.6126625, 0, 0, 19.05
45, 6.7351950, 0, 0, 19.05
45, 7.8577275, 0, 0, 19.05
45, 8.9802600, 0, 0, 19.05 
45,10.1027925, 0, 0, 19.05 

The file is preset for metric units. Save these lines to the text file DUOCOL.PAT (the name is important) in the Support folder of your AutoCAD user profile, e.g. C:\Users\USERNAME\AppData\Roaming\Autodesk\AutoCAD 2024\R24.3\enu\Support\duocol.pat. Or download the ready-made file from duocol.pat.

Now create or edit a Hatch in your DWG drawing, set it to a user pattern called "DUOCOL" and then set the hatch color to yellow and the background color to red. That's all.

The hatch will only display correctly at a certain scale (zoom) range - at distant view it will "blur" together, at close view the individual lines will be visible (in the .PAT definition you can densify them by averaging the first value - the line offset).

ACADADTPlantACADMCivilMapACLT
100% *  CAD 
27.7.2023    76675×  

See also:
Tip 5535:An effective way to bind raster images inside DWG files.
Tip 1818:How to make a multicolored line entity in AutoCAD?


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Generate hatch patterns automatically from your DWG drawings with
HGEN 2006 More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist