Creating Custom Line types -- Part V

Creating simple custom lines

The first thing you should do when attempting to create custom line types is draw one instance of your desired line. If it is a simple line type you can do this on paper but for more complicated lines you will find that using DataCAD and some of its measurement tools is helpful.

Let's start with a simple example that you can do on a piece of paper.

The default DASHED line type has a nagging habit of not closing corners when it is drawn as two perpendicular lines. From what you now know you should have an idea why this is. Here is a sample definition for the DASHED line type:
 

>Dashed
1.0
0    50
0   -50

Of course this is an imaginary line type definition since the DASHED line type is built into DataCAD and cannot be changed. However this is essentially what the definition is.

You should understand enough to see what this file says. Lets go through it line by line. Line one says this line is called "Dashed" and it is to be adjusted as needed  ('>') to fit the given space when drawn. Since the default spacing is not critical with this line it is set to '1.0'. The meat of the definition is the last two lines. Line three says to draw one stroke with the 'pen' down for 50 units. Line four does the same stroke with the pen up. So what does this look like? You should understand without seeing a picture that this simply draws a straight dashed line with equal parts 'line' and 'space'. The reason this line has the problem meeting at corners is in the fourth line. If the line ends on a space the corner of a joint appears open and is less than desirable as shown in the following example:

Standard Dashed Linetype

If we change the line definition to the following:

>NewDash
1.0
0    25
0   -50
0    25

The line will always start and end with a 'line' and the space will be eliminated from the corners as in the following example:

Revised Dashed Linetype

Notice how in each of the examples above the total distance from start to finish is 100. Remember that a negative distance is not subtracted from the distance but simply a way to tell the pen not to draw a stroke. This was a very simple example but in the next example we will show how to create a more elaborate line type.

Continue with Part VI


Thank you for printing this page. Please feel free to contact us for further assistance. You can call our sales department at +1 (800) 394-2231, Monday through Friday from 8:00 a.m. to 5:00 p.m. Eastern time or send an e-mail message to info@datacad.com.