Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
;-------- start of code ----
(defun c:ltypetoent (/ n sel entity name i)
(setq i 0 n 0)
(princ "\n Select entities to analyze ")
(setq sel (ssget))
(setq n (sslength sel))
(repeat n
(setq entity (ssname sel i))
(setq name (entget entity))
(if (not (assoc 6 name))
(progn
(setq layer (cdr (assoc 8 name)))
(setq layerinf (tblsearch "LAYER" layer))
(setq layerltype (cdr (assoc 6 layerinf)))
(setq name (append name (list (cons 6 layerltype))))
(entmod name)
(entupd entity)
)
)
(setq i (+ 1 i))
)
)
(princ "\n Type LTYPETOENT to run this command ")
(princ)
;------------ end of code ------
Change BYLAYER linetype setting to linetype defined for layer
This is the lisp I found on a website , it works fine , but only work on the entities you selected , doesn't work with entities inside blocks , is there a way to also change LTYPE inside a block?
Or in another word, make this command work in the whole drawing file like the SETBYLAYER command.
Sorry for my bad english , if you have trouble reading my question, I will try to explain more precisely.
Solved! Go to Solution.