Message 1 of 12

Not applicable
02-19-2016
08:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I want to automatically change DGN linetypes to ACAD linetypes of any layers in a drawing (so change not based on layername)
I tried to change an existing LISP but it changes all layers to continuous and I don't know how to group all possible DGN styles in the code to change to their ACAD linetype versions.
I probably need to remove "lt continuous" but I don't know what else I need to modify.
Thx,
Bart
CODE:
(defun c:CALLT (/ lt cl l e) ;; based on CALP LISP by Tharwat 19.Sep.2013 ;; (setq lt "dashed" ;; LineType ;; ) (if (not (tblsearch "LTYPE" lt)) (vla-load (vla-get-Linetypes (vla-get-ActiveDocument (vlax-get-acad-object) ) ) lt "acadiso.lin" ) ) ;; Change Linetype=DGN Style 2 of any layer UNDER CONSTRUCTION - Start ;; (while (setq l (tblnext "LAYER" (null l))) (if (wcmatch (cdr (assoc 2 l)) "*") (progn (setq e (entget (tblobjname "LAYER" (cdr (assoc 2 l)))) e (subst (cons 06 (if (and lt (tblobjname "DGN Style 2" lt)) lt "Continuous" ) ) (assoc 06 e) e ) ) (entmod e) ) ) ) ;; Change Linetype=DGN Style 2 of any layer UNDER CONSTRUCTION - End ;; (princ) ) (vl-load-com)
Solved! Go to Solution.