Jump to content

automaticaly draw loaded linetypes


Recommended Posts

Posted

I am building my first drawing template and am starting with an existing linetype file that I acquired that has maybe a hundred linetypes or more. I am too lazy to draw 100+ lines and change the linetype of all of them to see what the linetypes actualy look like so I can decide what to keep, delete or edit.

 

Does anyone have a way to automate drawing an example line for every linetype loaded in the drawing? Preferably with each line labeled as to what linetype it is.

Posted

Tried it once.

 

(defun c:AllLTypes (/ p)
 ;; Alan J. Thompson, 03.11.10
 (vl-load-com)
 (or *AcadDoc* (setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object))))
 (setq p -1)
 (vlax-for x (vla-get-linetypes *AcadDoc*)
   (setq p (1+ p))
   (entmakex (list '(0 . "LINE")
                   '(8 . "0")
                   (cons 10 (list p 0))
                   (cons 11 (list p 100))
                   (cons 6 (vla-get-name x))
             ) ;_ list
   ) ;_ entmakex
 ) ;_ vlax-for
 (princ)
) ;_ defun

Posted

A huge thank you. A good Lisp writer is worth his weight in gold!

Posted
A huge thank you. A good Lisp writer is worth his weight in gold!

Haha

I'll have to spend all weekend eating hamburgers and trade myself in on Monday. :wink:

 

Glad it helps and welcome to the forum. :)

Posted
A huge thank you. A good Lisp writer is worth his weight in gold!

How about a mediocre one and beer?

Posted
How about a mediocre one and beer?

Worth my weight in beer. I'm good with that. :lol:

Posted

Don't take it personally... I was inquiring for someone a little closer to home.

Posted
Don't take it personally... I was inquiring for someone a little closer to home.

Heh, it sounded good to me. :)

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...