Jump to content

Acad.lin file load by lisp


wimal

Recommended Posts

Something like this is what I have in my old notes.

 

(command "_.-linetype" "load" "*" "path to .lin" "") 

 

You can use the command line version of the Layer command (-LAYER) to load linetypes as well, at least you used to and seems to work in AutoCAD 2011.

Link to comment
Share on other sites

Try this.

(defun c:loadltypes ( / fn f rl ltname ltypes )
 (setq fn (open (setq f (findfile "acadiso.lin")) "r"))
 (while (setq rl (read-line fn))
   (if (eq "*" (substr rl 1 1)) (setq ltname (substr rl 1 (vl-string-position (ascii ",") rl))))
   (if ltname
     (progn
       (setq ltname (vl-string-left-trim "*" ltname))
       (setq ltypes (cons ltname ltypes))
     )
   )
 )
 (foreach ln ltypes
   (command "_.linetype" "l" f "" "s" ln "")
 )
 (command "_.linetype" "s" "ByLayer" "")
 (princ)
)

Link to comment
Share on other sites

Lee Mac's http://www.lee-mac.com/loadlinetype.html will search lin files and load a list of linetypes giving the option to redefine them. I use several lin files as an Arial font used by an Arial.lin produces clean visible dotted and arrow linetypes. I use another lisp to add the text style first if needed.

*STriangle, Solid Triangle__/_\_/_\__/_\_/_\_/_\_
S,.000000001,-.05,["\U+25BA",Arial,S=0.02,R=90,Y=-.0019],-.05
*ARROWH,Arrowhead  >  >  >  >  >  >  >
A,.000001,-3,["\U+25BA",Arial,S=3,R=0,X=-1.35,Y=-1.35],.000001,-4
*ArialARROW,Arrow1  >  >  >  >  >  >  >
S,.000001,-3,["\U+25AC",Arial,S=3,R=0,X=-1.35,Y=-1.05],.000001,["\U+25BA",Arial,S=3,R=0,X=0.5,Y=-1.42],.000001,-4
*ArialDOT,Dot . . . . . . . . . . . . . . . . . . . . . . . .
A,0,-.125,["\U+2022",Arial,S=.05,Y=-.024],-.125
*ArialDOT2,Dot (.5x) ........................................
A,0,-.0625,["\U+2022",Arial,S=.05,Y=-.012],-.0625
*ArialDOTX2,Dot (2x) .  .  .  .  .  .  .  .  .  .  .  .  .  .
A,0,-.25,["\U+2022",Arial,S=.05,Y=-.048],-.25

My Acad.lin and FDOT.lin files are huge. I'd never load all of either of them in a drawing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...