New CADforum look launched.
Over 1.079.500 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.
Over 1.079.500 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.
CAD tip # 5131:
Question
A
If you want to draw your dimensions, hatches, points or text always to fixed predefined layers, you can use several methods how to do this in plain AutoCAD (some vertical AutoCAD versions and add-ons offer this function automatically):
- you can customize (no programming) your AutoCAD toolbars so that the dimension functions will always start with a layer switch command:
_-LAYER;_Make;myDims;;_QDIM - place dim commands or hatch patterns onto a user Palette (Ctrl+3) and in the properties of these items (rt-click, Properties) set the given value for the Layer property; if you start commands from palettes, this is the best option for you
- use a .LSP program to redefine (_UNDEFINE) the _DIMxxxx commands so that they will always start with a layer switch command (_-LAYER)
- attach a reactor to the dimensioning commands which will automatically switch to a specified layer (and then switch the layer back)
- you can also change layer ex-post - use QSELECT or the Properties window to select all dimensions and then change their Layer property to the target layer
E.g. for FLay, you just prepare a simple text file FLay.tab with layer names for the individual object types (this file is loaded by the FLay utility). That's all, you can use standard commands. An example (hatches, red texts):
* Texts 1 TEXT MTEXT DTEXT * Hatch HATCH BHATCH
ACAD
*CAD
21.7.2006
64675×
FAQ
applies to: AutoCAD ·