|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: 2003-02
Posts: 3
![]() |
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 |
|
|
|
|
|
#2 | |
|
All AUGI, all the time
Join Date: 2003-10
Posts: 525
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Change this:
Quote:
(command "setvar" "limmax" (list x_val y_val)) You have to put the two variables together to form a list or XY coordinate value before you can pass it to the "limmax" command. Simply adding a comma between the defined x_val and y_val variables doesn't work. Example: (setq X 3) ;;sets X equal to 3 (setq Y 5) ;;sets Y equal to 5 (setq XYPNT (list X Y)) ;; uses the LIST method to return the value "(X Y)" which can be used as an X/Y coordinate in space. Hope this helps..
__________________
COOLMO If = 0 then End If |
|
|
|
|
|
|
#3 |
|
Member
Join Date: 2003-02
Posts: 3
![]() |
Thanks Got it to working!!! I knew it was easy just not that easy.
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|