Additional Linetypes

Tips and tricks you want to share with other users. Tutorials, user submitted documentation, etc.

Moderator: andrew

Post Reply
User avatar
Site Admin
Posts: 7818
Joined: Fri Mar 30, 2007 6:07 am

Additional Linetypes

Post by andrew » Thu Nov 27, 2014 10:14 am

Linetypes for electrical, water, power lines, ...

The attached file contains additional line type definitions for metric drawings:

Electical ---- E ---- E ---- E ----
Communication ---- BT ---- BT ---- BT ----
Water ---- W ---- W ---- W ----
Foul ---- FW ---- FW ---- FW ----
Surface ---- SW ---- SW ---- SW ----
High Voltage ---- HV ---- HV ---- HV ----
Low Voltage ---- LV ---- LV ---- LV ----
Overhead power ---- OHV ---- OHV ---- OHV ----
Foul Water Rising ---- FWRM ---- FWRM ---- FWRM ----

To install the new linetypes, simply save the attached file into your QCAD folder into the subfolder "linetypes/metric". Then restart QCAD and you will have those new types available.

You can also find plenty of other linetype definitions online. Keep in mind that some of them are referring to shape files (shx) which needs some porting to work with QCAD.
(1.02 KiB) Downloaded 775 times

User avatar
Site Admin
Posts: 7818
Joined: Fri Mar 30, 2007 6:07 am

Re: Additional Linetypes

Post by andrew » Sat Nov 29, 2014 5:15 pm

Here's an updated version with direction arrows for:

Foul ->- FW ->- FW ->- FW ->-
Surface ->- SW ->- SW ->- SW ->-
Foul Water Rising ->- FWRM ->- FWRM ->- FWRM ->-
(1.14 KiB) Downloaded 750 times
Save this file into linetypes/metric of your QCAD installation and those linetypes will be available for all new drawings.

If you need to update linetypes in existing drawing files, please proceed as follows:
1. make sure that you are using the latest version of QCAD (3.7.4 at the time of writing)
2. save the attached file into your QCAD installation directory under linetypes/metric
3. start QCAD 3.7.4 (or later)
4. load the existing drawing
5. choose Misc > Modify > Reload Linetype Definitions

The .lin files contain linetype definitions and are relatively easy to understand and edit with any regular plain text editor (note pad, TextEdit, ...).

For example the foul water line (->- FW ->- FW ->- FW ->-) definition is:
*FOUL,Foul ->- FW ->- FW ->- FW ->-
The first line contains the name of the linetype lead by a *, then a comma and a description of the linetype (currently not used by QCAD).
The second line is the crucial part.
- The first part is always 'A,'
- Any positive number is a dash of that length (e.g. a dash of 6.35 units)
- Any negative number is a gap between dashes
- Shapes or texts are defined in square brakes [] where the first part is the shape name (RIGHT_ARROW) or text ("FW") followed by the file name of the file containing the shape definition (qcadshp.shx) or the font name in case of texts (STANDARD). The other parameters are scale (S) rotation (R) and offset (X,Y).

To add another linetype like the FOUL type but with a text "XY" instead, simply add the two following lines to electrical_water.lin or another, new .lin file in linetypes/metric:
*MYTYPE,My Linetype ->- XY ->- XY ->- XY ->-
Note that qcadshp.shx really uses the font file fonts/qcadshp.cxf in QCAD since .shx files are not currently supported by QCAD to define shapes.

Post Reply

Return to “QCAD Tips and Tutorials”