AutoCAD Complex Linetypes – text or shape?

So you want to make a custom linetype for AutoCAD?

So you want to make a custom linetype for AutoCAD that contains text and/or symbols. Autodesk refers to these custom linetypes as “Complex Linetypes”. Should you use text or shapes for the complex parts of your new linetype?

Your first thought might be that you can only use text for text characters and only use shapes for symbols, but that is not exactly true. Certain fonts, for example the Wingdings truetype font that comes with Windows, contain all sorts of symbols. On the other hand a shape can be defined to look like text. So how do you decide?

Let’s look at text based complex linetypes first. When you create a text based complex linetype, the item you have to make a reference to is a Text Style, not a font. So far this sounds ideal, because every drawing has a Text Style named “Standard”, right? (Actually, the Text Style “Standard” can be renamed so you can’t count on this!). Even if you could depend on a particular Text Style to exist, you have no control over the font assigned to that text style. If the font or the fixed text height of the Text Style being used by your linetype is modified, then your linetype is probably not going to show up as you designed it.

Let’s look at shape based complex linetypes now. Suppose you make a shape file named “Custom.shx” and you define a shape inside of this file named “Box” and then finally, you create a complex linetype that references this shape named “Box”. You can be assured that the shape named “Box” inside the file “Custom.shx” will be used in your linetype. There is no Text Style for someone to change. Well, almost…. if the shape file is not available then guess what? Yes, the linetype will not be rendered correctly. If you are trying to load a shape based complex linetype and the shape file is not available, the linetype just will not load. You will get a dialog like this (you will get this same dialog if a required Text Style is missing too)

baddef

If you open an existing drawing with a shape based complex linetype and the shape file is not available, then the drawing will load, but the linetype will simply have gaps where your shape should be.

To look at it another way, say someone gives you directions to their house. They might say: travel south on Interstate 59, then take exit 94 and go east on route 16 for 3 miles, and the address is 8400 Route 16. That is not much different that what AutoCAD is going to do when it tries to display a complex linetype. For a text based linetype, AutoCAD will follow the instructions of looking for the Text Style in the drawing and then loading the characters from the font assigned to that Text Style. For shape based linetypes, it will look for the Shape File and then load the required shape(s) from that file.

Below is a sample LIN file containing one text based complex linetype and one shape based complex linetype.

Complex linetype definition samples

Complex linetype definition samples

So where are we?

If you use text in a complex linetype, the Text Style you use in the linetype defintion must exist in the drawing into which you try and load this linetype. And the properties of that Text Style must not be changed. If you are a single user, or a CAD Manager in an office environment, you can reasonably control standards such as ensuring that the Text Style exists in all drawings. But if you frequently share drawings with others, it’s not unheard of that someone might change the font or height of your referenced Text Style, destroying the design of your linetype.

If you decide to avoid the pitfalls of text based complex linetypes by referencing a shape file, then you should be aware of the pitfalls of shape based complex linetypes. The chief issue is that your custom shape file must accompany the DWG file everywhere it goes. If you send it out to a partner or client, you must send the shape (SHX) file. Not only that, you have to hope that the recipient knows what to do with the SHX file. Even if you use eTransmit and make a nice little package containing all your xrefs and shapes, etc. – there is still a chance the recipient of this will simple extract the DWG files and move on.

In summary, there is no right answer. It depends on your situation and how you share drawings with others. Both methods leave a lot to be desired. Maybe one day Autodesk will rework linetypes (Hey, how about a graphical linetype builder tool inside of AutoCAD?!?) – and change the way linetypes are stored in the drawing so that drawing files with complex linetypes can be shared freely without having to send references, and so that the drawing author can be assured that his/her custom linetypes will appear just as they were defined.

Block linetype

Block linetype from the above LIN file.