Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Export linetpyes from a dwg to a .lin file Aotucad 2015 C3D

Anonymous

Export linetpyes from a dwg to a .lin file Aotucad 2015 C3D

Anonymous
No aplicable

I've been tryin to export all of the linetypes out of our current .dwg  (which is our old template file) to a new .lin file.

 

I want to do this because we are in the process of creating a new template which is almost complete - with the exception

of adding in our linetypes.

 

I suggested using Design Center to copy them in, but was told not to do that because that will drag in a lot of extraneous

info we do not want in the new template.

 

I feel like I'm going crazy - When I'm in the old dwg file (the old template) that has the linetypes I want,  I check the support path that linetypes are loading from and see its pointing to my users support path acad.lin file, however when I open that acad.lin file it only has about half of those linetypes in it.  What does this mean ?  Or is it pulling from another acad.lin file that I just can't find ?  I've looked and looked.....

I can't seem to find the acad.lin file it's pulling all of these linetypes from.

 

Searching online I've found a few posts offering a .lsp routine to handle this, however each of those I've found and tried

resulted with an error message when I used APPLOAD to run the .lsp. -  maybe I'm doing something wrong here ??

 

These are the .lsp routines I downloaded and tried so far :

export ltypes.lsp

linout.vlx

to-lin.lsp

 

I tried to attach these .lsp routines to this post - not sure if it worked.

 

If anyone has any suggestions, I would greatly appreciate it !!

 

Thank you

DianneV

 

 

 

0 Me gusta
Responder
Soluciones aceptadas (1)
22.752 Vistas
17 Respuestas
Respuestas (17)

rkmcswain
Mentor
Mentor
Linetypes are stored in the DWG file.

LIN files only exist as a way to store and edit linetype definitions. There is no correlation between the existence of a LIN file and a given DWG file.

I can create 100 custom simple linetypes and send you the DWG file and they will all render correctly without you having the .LIN file.

Are the linetypes in question, simple or complex or a mix?
I don't think using DesignCenter will bring additional garbage with it, but I like to play it safe - so I don't see any problem with wanting to create a .LIN file from a DWG. The one named To-Lin.lsp will work, but there is one better called NEW-LIN.LSP ( http://www.turvill.com/t2/free_stuff/index.htm ) that will grab them all at once.

If any are complex linetypes, then you may have to play with the definitions so that the text style and/or shape file references will work.

R.K. McSwain     | CADpanacea | on twitter

Anonymous
No aplicable

There are a mix of simple and complex linetypes in the old template that I'm trying to

create a .lin file with.

 

I must be doing something wrong in downloading the .lsp routines.

I've tried and re-tried, but have had no success in getting any of them to work.

I tried to get this one - NEW-LIN.LSP ( http://www.turvill.com/t2/free_stuff/index.htm )

but when I select it from the website it opens as a text file in internet explorer - so I saved as

"NEW-LIN.lsp as opposed to the default .txt and used APPLOAD in acutocad - but get the message it can't load.

 

 

I'm not well versed in creating and editing linetypes and really thought it would be

simple enough to create a new .lin file. so that any linetype can be re-loaded if needed.

We've found frequently when using survey figures that utilize certain linetypes

(for instance a water line represented by a dashed line with a "w" in between the dashes)

the line will appear correctly and then the next day, open the drawing and the "w" is no longer visible-

with a re-load of the linetype it resolves that problem: Therefore my desire to create a new .lin file

 

The new template we are working on will be shared with multiple offices so we want to make sure all

support files are available for everyone - especially in the case they need to reload any linetypes considering the problem

with survey figures I mentioned above.

 

Would you have any suggestions or helpful instructions on downloading and using .lsp routines?

 

that would be excellent if I could get the one you suggested to work !!

 

DianneV

 

 

 

 

 

 

 

 

0 Me gusta

rkmcswain
Mentor
Mentor
What if you right-click on the NEW-LIN.LSP link and choose Save As (or Save Target, or something like that...).

I suspect the way you are getting the code is converting it to something that is non-ASCII.

R.K. McSwain     | CADpanacea | on twitter

rkmcswain
Mentor
Mentor
FYI: If you want to share the DWG, I'll export them for you.
R.K. McSwain     | CADpanacea | on twitter

Anonymous
No aplicable

Ok - I tried the right click & saveas - which indicated it was saving as a .lsp file....

I really thought it would have worked..... but I'm still getting the unable to load  :cara_de_decepción:

 

 

I thought I'd try downloading another .lsp - just to see if I could get any of them to work, but

no success with the other one either (converting layer names to text file) - which I could use

in the future when the new template is complete.

 

I'm going to try to attach the dwg file which is our blank template - the old one that I need the linetypes exported from.

 

Thank you for the offer to create the new acad.lin file for me - greatly appreciated !  :cara_con_una_leve_sonrisa:

 

If you ever come up with with any other thoughts on why these .lsp routines are not working for me - please let me know.

It would be nice to know that I can take care of the problem - in anticipation of adding new linetypes in the future !!

 

 

 

 

0 Me gusta

rkmcswain
Mentor
Mentor

See attached.

 

Review the file carefully because it will not fully load unless all of the shape file references can be found, and all of the text style references are in the current drawing. This is not an error in the .LIN file.

 

 

R.K. McSwain     | CADpanacea | on twitter

sthompson1021
Advisor
Advisor

OK, I downloaded the new-acad.lin lisp and got it to load and run. Where does it save the file to? I get the message that the file was created and the warning about the shapes, but when I click ok it doesn't open the file or give me any idea where it is. I tried (findfile "new-acad.lin") in the command line and get nil. I tried a windows search for the file and got no matches. Any hints?

0 Me gusta

Anonymous
No aplicable

Thanks for your assistance with creating this file :cara_con_una_leve_sonrisa:

 

I will be doing a test dwg file with this first thing when I return to the office tomorrow morning.

I might suspect an issue with shape files (maybe text files too) as you mentioned.

 

If you have any suggestions why the .lsp may not have worked for me, please let me know.

I'd like to be able to create an updated .lin file - in case we add anything new.

 

Perhaps you could send me your .lsp file - and I could try it (if you don't mind).

 

Thank you

DianneV

 

 

 

0 Me gusta

sthompson1021
Advisor
Advisor

Here is the lisp file. Make sure it is in your support file search path. Hopefully RK will share the secret of where the new .lin file is created.

0 Me gusta

rkmcswain
Mentor
Mentor
In my case, it wrote it to the "current directory".
An easy way to find that is....
Run the -insert command (note the leading hyphen).
When it asks for a block name, type in something random (i.e.: asdljfhaskjhfasdf)
Then you will get an error saying it can't find the block, and the "current directory" will be listed first.

R.K. McSwain     | CADpanacea | on twitter

vladimir_michl
Advisor
Advisor

You can also try LinOut - it will handle plain, text-based and shape-based complex linetypes in a DWG a export them to .LIN files. See:

http://www.cadforum.cz/cadforum_en/qaID.asp?tip=3958

 

Vladimir Michl, www.cadstudio.cz

 

0 Me gusta

Anonymous
No aplicable

I'm sorry but I have to re-open this thread.  I try to run new-lin.lisp.  I load the lisp routine, then type "new-lin"  and I get the error in the command line :

; error: bad argument type: stringp nil

 

What am I doing wrong??

0 Me gusta

rkmcswain
Mentor
Mentor
We'd be guessing without the DWG file.
R.K. McSwain     | CADpanacea | on twitter
0 Me gusta

leothebuilder
Advisor
Advisor

I know this is an old thread but I have a similar aim to get a .lin file from a custom linetype probably created in Civil3D.

I've tried several lisp routines. Some work, some only create a partial .lin file.

Could you have a look at the attached and see if you can extract the .lin definition.

Thanks

0 Me gusta

vladimir_michl
Advisor
Advisor
Solución aceptada

These special types of linetypes (coming from DGN) cannot be represented through a .LIN linetype definition.  AutoCAD native linetypes cannot use start/end-symbols.

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

0 Me gusta

leothebuilder
Advisor
Advisor

Thank you. I figured that these were unusual considering that Autocad only allows repeated patterns.

The linetype does seem to work in Autocad, although with some peculiar behaviors sometimes.

Beginning and ending autocad linetype symbols should be on the wishlist.

0 Me gusta

Anonymous
No aplicable
I no longer work where I have accesss to Autocad, at this time. I hope someone else can step in and check for these for you. I wish you luck!


0 Me gusta