Author Topic: How to copy a linetype to a new name, but not rename?  (Read 214 times)

0 Members and 1 Guest are viewing this topic.

gswang

  • Newt
  • Posts: 113
How to copy a linetype to a new name, but not rename?
« on: May 22, 2019, 10:02:08 AM »
How to copy a linetype to a new name, but not rename?
That is to say, keep the original linetype name.

thank you very much.

ronjonp

  • Needs a day job
  • Posts: 6938
Re: How to copy a linetype to a new name, but not rename?
« Reply #1 on: May 22, 2019, 10:33:37 AM »
Is this a trick question?  :-D

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC

PKENEWELL

  • Bull Frog
  • Posts: 207
Re: How to copy a linetype to a new name, but not rename?
« Reply #2 on: May 22, 2019, 12:55:58 PM »
@ gswang

1) Search for "acad.lin" file in you support paths. You can type (findfile "acad.lin") at the AutoCAD  command line.
2) Navigate to the folder where "acad.lin" is found and open the file in Notepad.
3) Find the linetype you want to copy in the file, then copy (CTRL+C) the 2 lines in the text file.
4) Go to a blank line in the text file and Paste (CTRL+V) the copied lines.
5) After the "*" and the "," on the first line of text, change the name of the Linetype to what you want. NOTE: You can also adjust the look of the linetype in the rest of the text lines, but you will have to learn how to do it properly (search for "To Add a Simple Linetype to an LIN File" in AutoCAD Help).
6) Save the acad.lin file
7) in the drawing , you will have to LOAD the linetype; i.e. select the linetype for the layer, when the dialog comes up, select the "Load button", then find the new linetype name.

Here is a link for more info: https://allaboutcad.com/tutorial-create-a-custom-simple-linetype/

PS: You can also use the "Make Linetype" tool in Express Tools if you have them loaded (command MKLTYPE)
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt

Dlanor

  • Newt
  • Posts: 148
Re: How to copy a linetype to a new name, but not rename?
« Reply #3 on: May 22, 2019, 01:59:19 PM »
And if your using metric find acadiso.lin

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 988
  • Marco
Re: How to copy a linetype to a new name, but not rename?
« Reply #4 on: May 23, 2019, 08:32:25 AM »
if your linetype is in Acad*.lin
   Read the file until find your linetype ex:
   *CENTER,Center ____ _ ____ _ ____ _ ____ _ ____ _ ____
   A, 31.75, -6.35, 6.35, -6.35
   write the  modified info in a .lin file then:
   (command ".-linetype" "load" "*" file "")
else:   
   rename your linetype ex: CENTER to MyCENTER
   wblock on DWG an object with linetype MyCENTER
   rename your linetype MyCENTER to CENTER
   insert DWG with MyCENTER

else:   maybe with (vla-copyobjects dbxDoc ...)