Contents
Issue:
When trying to load a custom complex linetype, the following error message appears in AutoCAD:
AutoCAD
“Bad definition of ____ at line __ of file ____.lin” .
If the linetype is already being used in the drawing, it doesn’t display correctly.
Causes:
There are a few possible causes for this issue:
- SHX or SHP files are missing from linetype definitions.
- Mismatch of SHP (shape) name in the drawing with the .lin file
- Corrupted SHP file
- Issue with support file path location where shx is located
Solution:
To resolve this issue, try the following:
Place SHX and SHP files in the AutoCAD Font Folder
Copy the corresponding SHX and SHP files to AutoCAD Font folder:
C:Program FilesAutodeskAutoCAD version>Fonts
Make sure .LIN file is in the correct folder
If the
.lin is saved to a non-default folder, make sure it is
added to a to the Support File Search Path
Verify SHP file in the drawing matches the one defined in the .LIN file
To verify the name, follow the steps below:
- Open the drawing which contains the embedded shape file.
- Enter SHAPE in the command line input and press <Enter>
- Note which shapes AutoCAD has available
- Open the .lin file which contain the definition/syntax for the custom linetype.
- Make sure the shape names matches. For example the correct syntax should be as follow:
*UDRAIN,U Drain ->-
A,2.863274,[
UD,U-Drain.shx,s=1],2.136726
UD,U-Drain.shx,s=1],2.136726
Video:
Note: The shape name (
name.shp) in the folder also needs to match.
name.shp) in the folder also needs to match.
Check Support File Path Location
Make sure that the SHX, SHP, and .LIN files are located in one of the Support File Paths. Make sure that the Support File Path location is unique (i.e. avoid folders with similar names)
Products:
AutoCAD Products;
Versions:
any_version;
Source: Autodesk