AfraLISP helps you learn how to use AutoLISP the AutoCAD API. Learn how to become more productive with AutoCAD by writing your own AutoLISP routines. In this tutorial we are going to look at creating a complex linetype using a text object as a descriptor. It is recommended that you create separate text styles for text in.
AutoCAD comes preinstalled with a wide array of linetypes and even though we…have several to choose from, the stock collection probably doesn't contain every…linetype that you may need.…In this lesson, we'll learn how to create our own custom linetypes to suit any situation.…Let's start by taking a look at the linetypes that are provided by AutoCAD.…I'm going to open the Linetype fly-out, I'll select Other, I will then click…Load, and from here I can see a list of the factory installed AutoCAD linetypes.…Take a look up here at the top, notice these linetypes are coming from a…file called acad.lin.…
If I click the File button, we can see where the acad.lin file is being saved in our system.…I'm going to right-click on this file and I'll select Open with and the…computer is suggesting that I open this file using Notepad, which is fine. I'll click OK.…As you can see each linetype in the lin file is defined using a couple lines of text.…Now we're not going to get too technical into this. I just want to show you that…
- At the Command prompt, enter -linetype.
- Enter c and press Enter.
- Enter a name for the linetype and press Enter.
The linetype name can include up to 255 characters. Linetype names can contain letters, digits, and the special characters dollar sign ($), hyphen (-), and underscore (_). Linetype names cannot include blank spaces.
- In the Create or Append Linetype File dialog box, select an existing LIN linetype file or enter a new file name in the File Name box. Click Save.
If you select an existing file, the new linetype name is added to the file.
- (Optional) Enter text that describes the new linetype and press Enter.
- At the Enter Linetype Pattern prompt, specify the pattern for the tinetype and press Enter. Follow these guidelines:
- All linetypes must begin with a dash.
- Enter zeros for dots.
- Enter negative real numbers for spaces. The value defines the length of the space in drawing units.
- Enter positive real numbers for dashes. The value defines the length of the dash in drawing units.
- Separate each dot, dash, or space value from the next with a comma.
- Use a space between a dot and a dash.
- Press Enter to end the command.