I need a routine make this automatically.
This routine change linetype scale as i want but it does not work for blocks.
(defun c:ltchange (/ mult ss n ent)
(setq mult (getreal "\nMultiplier to apply to all objects' linetype scales: "))
(setq ss (ssget "_X" '((0 . "arc,circle,ellipse,line,*polyline"))))
(repeat (setq n (sslength ss))
(command "_.chprop" (setq ent (ssname ss (setq n (1- n)))) ""
"_ltScale" (* (cond ((cdr (assoc 48 (entget ent)))) (1)) mult)
;; [no (assoc 48) entry if object's ltScale is 1]
""
)
); repeat
(princ)
)
This routine works for blocks but it does not change the scale by a factor. It asks for a new scale.
(defun c:ltschange ( / doc scl )
(initget 6)
(if (setq scl (getreal "\nSpecify new linetype scale: "))
(vlax-for blk (vla-get-blocks (setq doc (vla-get-activedocument (vlax-get-acad-object))))
(if (= :vlax-false (vla-get-isxref blk))
(vlax-for obj blk
(if (and (vlax-write-enabled-p obj) (vlax-property-available-p obj 'linetypescale t))
(vla-put-linetypescale obj scl)
)
)
)
)
)
(vla-regen doc acallviewports)
(princ)
)
Is there any way to combine them?
Thanks in advance.