Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bad definition of linetypes after purging missing shx files

12 REPLIES 12
Reply
Message 1 of 13
Yonas89
4084 Views, 12 Replies

bad definition of linetypes after purging missing shx files

Hello, 

 

I have installed my civil 3d 2015 version, and first I got a notification that one or more shx files are missing (picture1). I tried to find how to solve this, by not just clicking ignore button, so I found this autolisp routine which purges missing shx files: http://autocadtips.wordpress.com/2013/06/03/autolisp-purge-missing-shx-files/ . However after that I discovered that my lines with "TRACKS" linetype was just showing up as simple continious line. I have tried to load another acad.lin file (by thinking that it might solve my problem).However  I noticed that "bad definition" notifications" appears (picture2). I have noticed that all linetypes  which issue a "bad definition" error has a ltypeshp.shx named in their second line of definiotion in acad.lin file. I suppose I have purged my linetype.shx file when I loaded that autolisp routine, and now I want to bring it back.  

12 REPLIES 12
Message 2 of 13
Jay_B
in reply to: Yonas89

The first message is indicating that your drawing has linetypes which use a custom shape (shx) file and Autocad can't find and load them properly..

 

In OPTIONS > Files Tab > Support File Search Path > Folders containing any custom  linetype (shx) or (shp) files must be mapped here.

 

As far as the "Bad Definition" error, try the above first, as this error might go away once things are properly mapped.

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 3 of 13
jmayo-EE
in reply to: Jay_B

If I can add a bit to Jay's post. The second error is due to the fact that the linetypes you are trying to load contain text styles that are not in the drawing.

 

You need to load or create the text styles before loading the lines. These custom elements should also be added to any template file you use.

 

If this file loaded correctly on previous versions then your old setup has custom elements that were not migrated to 2015.

 

You have shx files, font styles and linetype files that should be copied from the old versions 'support' folder to a central file store separate from the autocad install folder. One these files are in this folder add the folder to the Support File Search Path in the Options dialog, Files tab. All users should point to this folder to get the same custom elements in their files

 

If and when you upgrade again simply add the same path to the new version after installing and the custom elements will again migrate forward. 

John Mayo

EESignature

Message 4 of 13
Yonas89
in reply to: jmayo-EE

Well, the thing is that I do not use any custom linetypes. I have also checked my support file path, which looks correct to me, so I am still facing this problem. 

Message 5 of 13
Jay_B
in reply to: Yonas89

The Acad.lin file includes the Linetype Tracks which happens to use a custom shape.

 

*TRACKS,Tracks -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
A,.15,[TRACK1,ltypeshp.shx,s=.25],.15

 

Linetype Tracks is dependent on the shape file, ltype.shx.

 

I suspect Autocad can't find the shx file.

 

Enter (findfile "ltypeshp.shx") at the command line and press Enter to verify whether Autocad is finding ltypeshp.shx .

The above should return the location if found.

 

Typically it's available here:

 

C:\Users\user name\AppData\Roaming\Autodesk\AutoCAD 2015\R20.0\enu\Support\

 

Is above location listed in Support File Search Path's in Options?

 

 

 

 

 

 

 

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 6 of 13
AllenJessup
in reply to: Yonas89

Your second screen shot shows many non-OOTB linetypes.

 

Allen



Allen Jessup
Engineering Specialist / CAD Manager

Message 7 of 13
Jay_B
in reply to: Yonas89

What happens if you launch c3d using a default profile, create a new drawing and draw a line using TRACKS linetype.

 

Does the Tracks linetype display correctly then?

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 8 of 13
Yonas89
in reply to: Jay_B

Thank you for the answers. Sorry for a bit late reply.  After I enter the findfile command the command line shows me the way to that file and I have checked it is listed in support file serach path as it should be. So I gues this is not the problem. In the complete new drawing it gives me bad definition notifications too and when I try to load a linetype from acadiso.lin file the "tracks" linetype is not found, though it exists in that file when I open it directly in support folder. 

Message 9 of 13
rl_jackson
in reply to: Yonas89

I have had similar issues with custom line types not loading, all of which have a shape file associated with it (shx) no matter where I but it, it would not read or recognize the file. I resorted to re-writing the line type with a Arial Unicode symbol to replicate the shx file (were possible) and got rid of shx all together. I have the Standard text set to Arial by default, and do not use shx period. Its just a added cluster in the mix that is total unnecessary.

Rick Jackson
Survey CAD Technician VI

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 10 of 13
Yonas89
in reply to: Jay_B

I have also noticed, that when I fully turn off civil3d software, and start again a new drawing no errors appear and "tracks" linetype seems to be working. But when I open that problematic drawing everything changes and it does not matter in which drawing  I work, new or that problematic those particular linetypes does not work and "bad definition notification" appears. 

 

 

Message 11 of 13
jmayo-EE
in reply to: Yonas89

I have the same issue Jonas. Old file, bad def, everything works in a new files, open this one data set and everything breaks.

 

Did you ever get this worked out?

John Mayo

EESignature

Message 12 of 13
Yonas89
in reply to: jmayo-EE

Sorry, but I did not find the answer for that. Seems that I do not face this problem anymore. I remember that I was using FONTALT by changing its variable to 0 or "." (do not quite remember now) to solve appearence of linetypes in the drawing. However after changing it caused a disappearance of my block attributes which I had in the drawing, thus I had to issue FONTALT command again. This time I had to type simplex.shx. It looked that it has solved that problem at that time, cause both: my linetypes and block attributes was showing properly. As I said, this workflow was just a temporary solution, because next time, when I opened the same drawing I was facing the same problem. 

 

Message 13 of 13
JTudor_Atkins
in reply to: Yonas89

Check this out if you are still having a problem with Bad Definition problem. This worked for me.

https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Bad-de...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report