Creating a linetype with text and gaps

Creating a linetype with text and gaps

lana_whyte
Explorer Explorer
336 Views
2 Replies
Message 1 of 3

Creating a linetype with text and gaps

lana_whyte
Explorer
Explorer

Hi there,

I'm trying to create a line with text and gaps. I managed to by editing the .lin file, but depending on how long the line is, the first and last dashes are abnormally long.

 

Does anyone know how to fix this? I've included a screenshot of the line below, as well as my linetype specification that I wrote in the .lin file.

 

*VENT_LINE, Vent line --V-- -- -- -- --V-- --
A,.25,-.125,["V",STANDARD,S=.075,U=0.0,X=-0.0,Y=-.0375],-.125,.25,-.25,.25,-.25,.25,-.25,.25,-.25

 

lana_whyte_1-1736202522330.png

 Thanks in advance!

0 Likes
337 Views
2 Replies
Replies (2)
Message 2 of 3

Brock_Olly
Collaborator
Collaborator

Since I don't know much about linetype creation I asked our friendly AI assistant chatGPT and he came up with this:

 

1) Add End Caps (Optional Adjustment)
To ensure the line starts and ends consistently, you can add explicit end gaps or dashes to your pattern.

 

For example:

 

A, 0, -0.125, ["V", STANDARD, S=0.075, U=0, X=0.0, Y=-0.0375], -0.125, 0.25, -0.25

 

 

Here:

  • The 0 at the start and end of the pattern ensures a uniform dash at the line’s beginning and end.
  • Adjust gaps (-0.125, -0.25) and dash lengths to suit your design.

 

2) Enable "Linetype Generation"

In AutoCAD, enabling Linetype Generation forces the line to render with a consistent pattern across its full length, avoiding uneven segments at the ends. To enable this:

  • Select the line.
  • Open the Properties palette (Ctrl+1).
  • Set Linetype Generation to Enabled.

 

3) Modify the Line’s Length
If possible, ensure the total length of the line is a multiple of the pattern's total length. This avoids uneven spacing issues.

 

4) Adjust the .LIN File Pattern
If the above options don't solve the problem, tweak the pattern in the .LIN file. For example:

 

 

 

*VENT_LINE, Vent line --V-- --V-- --V-- A, 0.25, -0.125, ["V", STANDARD, S=0.075, U=0, X=0.0, Y=-0.0375], -0.125, 0.25

 

 

This balances the dashes and gaps around the text.

 

5) Test with Different Scales
If the issue persists, adjust the linetype scale by typing LTSCALE in the command line and testing with different values.

0 Likes
Message 3 of 3

Kent1Cooper
Consultant
Consultant

Non-continuous linetypes can be applied to linework only in complete cycles of the linetype definition.  Anything beyond what fits that way becomes continuous fill-out at the ends [or emptiness from the defined cycle to just points at the ends, depending on certain details of the definition].  The complete cycle of your linetype definition needs to include all the dashes and gaps associated with a single text inclusion.  That makes for a rather long overall cycle, which is the reason for your issue.  What you can do about it:

Change the definition to have the text inclusions closer to each other, making for fewer dashes and gaps for each text inclusion, and therefore a shorter definition cycle;

Adjust the length of objects where you can [e.g. where they are only diagrammatic, and don't directly represent physical reality needing specific lengths];

Play with the linetype scale of objects where the difference in the size of the elements isn't unacceptably obvious.

Kent Cooper, AIA
0 Likes