mpsmith00
2004-07-07, 08:45 PM
I am working on a quick lisp file to change the text size and limits by multiplying the dimscale. I can get the following variables but can't get my lisp routine to set limmax Here is what I got.
(defun c:slm (/ ds otxs ntxs dms oldx_val oldy_val x_val y_val)
(setq ds (getreal "\nEnter new dimscale: "))
(setvar "dimscale" ds)
(setq dms (getvar "dimscale"))
(setq oldx_val (car (getvar "limmax")))
(setq oldy_val (cadr (getvar "limmax")))
(setq otxs (getvar "textsize"))
(setq x_val (* oldx_val dms))
(setq y_val (* oldy_val dms))
(setq ntxs (* otxs dms))
(command "setvar" "textsize" ntxs)
(command "setvar" "limmax" x_val , y_val)
(princ)
)
Like I said it is a quick change. I have to update a lot of drawings and all info is in model space and the Engineer want's it to stay that way.
Any help would be greatly appreciated
(defun c:slm (/ ds otxs ntxs dms oldx_val oldy_val x_val y_val)
(setq ds (getreal "\nEnter new dimscale: "))
(setvar "dimscale" ds)
(setq dms (getvar "dimscale"))
(setq oldx_val (car (getvar "limmax")))
(setq oldy_val (cadr (getvar "limmax")))
(setq otxs (getvar "textsize"))
(setq x_val (* oldx_val dms))
(setq y_val (* oldy_val dms))
(setq ntxs (* otxs dms))
(command "setvar" "textsize" ntxs)
(command "setvar" "limmax" x_val , y_val)
(princ)
)
Like I said it is a quick change. I have to update a lot of drawings and all info is in model space and the Engineer want's it to stay that way.
Any help would be greatly appreciated