CAD2005 Posted December 21 Posted December 21 (edited) I want to type 100, then the linetype scale will be 100, so how can this lisp be calibrated? thanks a lot ;Change linetype scale by a factor. (defun c:lrr () (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 ) Back to Top Edited Sunday at 09:25 AM by CADTutor Quote
EIA Posted Monday at 11:10 AM Posted Monday at 11:10 AM In case it helps, here is the code I use for changing the linetype scale in multiple lines: (defun c:default ( / sel i obj objType newLT) (setq sel (ssget)) (setq newLT (getreal "\nNew linetype scale")) (setq i 0) (while (< i (sslength sel)) (setq obj (vlax-ename->vla-object(ssname sel i))) (setq objType (vla-get-objectname obj)) (vlax-put-property obj 'LinetypeScale newLT) (setq i (+ i 1)) ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.