Yup, even though competitors like MicroStation and TurboCAD have had built-in linetype editors for years now, Autodesk still expects the customers of its $4,100 software to construct linetypes by hand, in writing the cryptic code in Notepad.
Reader A.C. last week wrote me:
I have been reading your tutorials on linetype files for AutoCAD and I have made an attempt at a complex linetype, but unfortunately I can’t get the coding right. Is there any way you can help? What I am after is combining two to make one. Is it possible to add the crosses from the ‘redundant apparatus’ linetype to the ‘foul water rising main’ linetype?
He provided me with the code he had written and screen grabs of what he wanted. I did some experimenting in Notepad, going through this debugging cycle:
1. Write some linetype code in Notepad.
2. Save the file as an LIN file.
3. Use the -linetype command to load the LIN file.
4. Enjoy (not!) decoding the cryptic error messages, all of which read generically like this, no matter the problem:
(Reporting a problem in Line 2 is unhelpful, Autodesk, because Line 2 is the entirety of the code.)
5. Repeat.
Anyhow, eventually I found that yes, we can place two characters in a single complex linetype definition. The character codes are shown in boldface:
A,.5,-.2,[Box,GCltypeshp.shx,S=.1,R=0.0,X=-0.05,Y=-.05],-.1,[ZAG,GCltypeshp.shx,x=-.2,s=.2],-.2
The key to success was to put in a "dummy" code between the two characters, such as the -.1 shown in red, above.
Mr A.C. was happy with my discovery, writing:
I have adjusted the coding to give me a slightly different arrangement:
*Foul Water Rising Main - Abandoned,x-/-x-/-x-/-x-/-x-/-x-
A,.5,-.2,["X",STANDARD,S=.1,R=0.0,X=-0.575,Y=-.05], .01,-0.01,[ZAG,GCltypeshp.shx,x=-.425,s=.2],-.2
And then he had one more request:
Out of interest, do you know if it is possible to change the colour of the ‘x’s? Possible to black rather than the same colour as the line?
But no, Autodesk does not allow us to set the color for individual elements; just for the entire line.
Nor as far as I'm aware can you use fields to have dynamic text, such as reporting the elevation within the line type definition, which would be useful when creating contour lines. Or maybe reflect the layer name.
Cynical thinking is that these things are limited to make the verticals look more desirable.
Posted by: Jason Bourhill | Mar 04, 2013 at 10:08 PM
Your idea of field text in linetypes is kewl. Wish Autodesk would think of this.
Posted by: Ralph Grabowski | Mar 04, 2013 at 10:34 PM
If you desire more control and capabilities for linetypes in AutoCAD or BricsCAD, take a look at AutoLINE Linetype Manager.
AutoLINE allows users far more control over their linetype appearance than native AutoCAD, and will display linetypes that have never been possible in AutoCAD.
• AutoLINE will draw multiple parallel lines with variable spacing between them
• AutoLINE will use blocks in linetypes, not just shapes (blocks can include wipeout entities)
• Blocks, text or negative dashes can be first in the linetype definition
• AutoLINE will control the width of a line or what text is placed in the line on an entity-by-entity basis
• AutoLINE allows you to include LISP expressions in the linetype definition for greater flexibility
• Plus many more features and benefits for CAD users
https://autodsys.com/autolinehome.html
Posted by: Ron Prepchuk | Nov 14, 2024 at 11:38 AM