Results 1 to 3 of 3

Thread: Can't pass the limits

  1. #1
    Member
    Join Date
    2003-02
    Posts
    3
    Login to Give a bone
    0

    Angry Can't pass the limits

    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. #2
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    706
    Login to Give a bone
    0

    Default Re: Can't pass the limits

    Change this:

    (command "setvar" "limmax" x_val , y_val)
    to this:

    (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..

  3. #3
    Member
    Join Date
    2003-02
    Posts
    3
    Login to Give a bone
    0

    Thumbs up Re: Can't pass the limits

    Thanks Got it to working!!! I knew it was easy just not that easy.

Similar Threads

  1. pass.... incomplete
    By Liamnacuac in forum AutoCAD General
    Replies: 3
    Last Post: 2010-01-13, 08:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •