csccsccsc
14.07.2015, 13:32
Hi,I am searching a lisp to change linetype scale by a factor. And I found the following code. However, it only works with a single object. Is is possible to modify it so that it can work with multiple objects? Thank you very much!Chan;;Change linetype scale by a factor.
(defun c:lsr ()
(setq en (car
(entsel))
ed (entget en)
lts (cdr (assoc
48 ed))
)
(if (/= lts nil)
(progn
(setq ns (getreal
(strcat "\nScale linetype what factor of current scale? Current scale:
<"(rtos lts)">. "))
ns2 (* (/ ns )
lts)
)
(setq ed
(subst (cons 48
ns2)
(assoc
48 ed)
ed
)
)
(entmod ed)
(entupd en)
);progn
(progn
(setq ns (getreal
(strcat "\nScale linetype to what factor of current scale? Current scale:
<"(rtos 1)">."))
ns2 (* (/ ns )
1)
)
(command
"change" en "" "p" "s" (rtos ns2)
"")
)
);if
)
(defun c:lsr ()
(setq en (car
(entsel))
ed (entget en)
lts (cdr (assoc
48 ed))
)
(if (/= lts nil)
(progn
(setq ns (getreal
(strcat "\nScale linetype what factor of current scale? Current scale:
<"(rtos lts)">. "))
ns2 (* (/ ns )
lts)
)
(setq ed
(subst (cons 48
ns2)
(assoc
48 ed)
ed
)
)
(entmod ed)
(entupd en)
);progn
(progn
(setq ns (getreal
(strcat "\nScale linetype to what factor of current scale? Current scale:
<"(rtos 1)">."))
ns2 (* (/ ns )
1)
)
(command
"change" en "" "p" "s" (rtos ns2)
"")
)
);if
)