Hide Table of Contents

Customizing LineStyles

LineStyles are used in drawings to enforce the informative value of drawings and to conform with industry standards. The LineStyle command lets you load and manage LineStyles. You can assign LineStyles to layers or directly to new entities. To use LineStyles, you must load them from files that define the dash-dot patterns.

LineStyle Files and File Location

LineStyle definition files are stored in ASCII text files using the .lin extension.

To change the search location for LineStyle definition files:

  1. Click Tools > Options (or type Options).
  2. Click Tools > Options (or type Options).
  3. Click Application menu > Preferences (or type Options).
  4. In the Options dialog box, click File Locations .
  5. Expand Drawing Support > LineStyle File.
  6. Select the path and click Browse (or double-click the path).
  7. In the Browse For Folder dialog box, browse to the new path and click OK twice.

LineStyle File Syntax

You can place comments in the file by beginning the file lines with a semicolon followed by text.

A LineStyle format comprises two lines:

  • The first line, or header, starts with an asterisk and contains the LineStyle name followed by a comma and a symbolic representation of the LineStyle made up of a string of dashes, spaces, and dots.
  • The second line, or definition line, contains a geometric description of the LineStyle.
Examples:
  • Header: *LineStyle [, LineStyle description]
  • Definition line: Line segment length 1, Line segment length 2, ..., Line segment length n

The following example shows the definition of a dash-dot LineStyle:

*Dashdot, _ . _ . _ . _ . _ . _ . _ . _ . _ . _ . _ .
A, 0.5, -0.25, 0, -0.25

The header includes an asterisk followed by the line LineStyle (Dashdot). A comma separates the symbolic representation of the LineStyle ("_ . _ .").

The second line contains the LineStyle's geometric definition.

All definitions of dashes, dots, and spaces are separated by commas:

  • Dash: The drawing elements are shown as positive figures, for instance 0.5 represents a dash ("pen down") with a length of 0.5 drawing units.
  • Dot: Dots are shown as 0 values.
  • Space: Spaces are shown as negative figures, for instance -0.25 represents the space ("pen up") in which no line should be drawn.

The length specifications represent drawing units when the LineScale factor is set to 1.00.

Complex LineStyles

Complex LineStyles specify single - possibly broken - lines interspersed with symbols. These LineStyles can include text or shape definitions as pattern descriptors along with the dash and dot descriptors of simple LineStyles. Usually they denote boundaries, contours, or utilities.

Text elements or shapes embedded in Lines are always drawn completely (never trimmed).

Syntax

The syntax for complex LineStyles is similar to that of simple LineStyles.

The syntax for text and shape descriptors in a LineStyle description is a comma-delimited list of pattern descriptors as follows:

Shape definitions

[Shape_Name, SHX_Filename]

- or -

[Shape_Name, SHX_Filename, Transformation]

The Shape_Name argument specifies the name of the shape to draw. This argument must be included. The shape name must exist in the specified shape file.

The SHX_Filename argument specifies the name of a compiled shape definition file (.shx). This argument must be included. If no path is defined for the file name (which is recommended), the library path is searched.

Text definitions

["String", TextStyle_Name]

- or -

["String", TextStyle_Name, Transformation]

The String argument defines the text to use in the complex LineStyle. You cannot use the characters ‘ (single quotation) or " (double quotation) in the string. To use these characters, use a control code %% with the sub-seeding ASCII value for the character.

The TextStyle_Name argument determines the TextStyle to elaborate.

Transformation specifications

The Transformation argument is optional and can be any series of the following, each preceded by a comma:

R=value Relative rotation
A=value Absolute rotation
S=value Scale
X=value X offset
Y=value Y offset

In this syntax, the value argument is a signed decimal number (for example, 1, -0.25, 0.3).

The rotation arguments are in degrees, the other arguments are in LineStyle-scaled drawing units.

The preceding transformation letters, if used, must be followed by an equal sign and a number.



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Customizing LineStyles
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: 2019 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.