Try this:
(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)
)
It seemed easier to word the prompt generically in terms of multiplying rather than dividing. If you want to divide all linetype scales by, for example, 3, you can be more precise than, say, 0.33333 by doing it fractionally, answering 1/3 to the prompt for a multiplier. Or, if you're always going smaller, you could change the prompt wording [and the 'mult' variable name], and change the * function to / . [But if you want them all 2/3 of their current ltScale, and you ask for a divisor, it would need to be 3/2, and it might be hard to word the prompt in a way to get that answer.]
EDIT: If you're dealing with things in multiple spaces, that won't work -- ordinary editing commands like CHPROP can't find things that aren't in the current space. But it could be done with (vla-put) or (subst)/(entmod) methods even on things in other spaces -- would you need that?
Also, I left your command name, but I'd suggest changing it to something like LTSchange, since it's not changing the linetypes of objects.
Kent Cooper, AIA