Whats Wrong with this......

Discussion in 'AutoCAD' started by sashk, Aug 22, 2003.

  1. sashk

    sashk Guest

    (if (<= (getenv "CmdVisLines") "4")
        (progn
          (setenv "CmdVisLines" "5")
          )
        )

    When I run it, it works. But, even if I have more than 4 command lines (say 12) it still sets it to 5 lines. What am I doing wrong?

    thanks
     
    sashk, Aug 22, 2003
    #1
  2. sashk

    C Witt Guest

    why not just use this?
    (< (getenv "CmdVisLines") "5")
     
    C Witt, Aug 22, 2003
    #2
  3. sashk

    sashk Guest

    Huh?

    When I use it, it works, but even if my CmdVisLines is &gt; than 4, it still sets the amount of lines at the command line to 5. If the user has less than 5 lines, I want it to change to 5 lines and if they have &gt; than 5 commandlines, I want what they have to stay as is

    Thanks
     
    sashk, Aug 22, 2003
    #3
  4. sashk

    Bob Basques Guest

    Try it like this:

    (if (<= (atoi (getenv "CmdVisLines")) 4)
    (progn
    (setenv "CmdVisLines" "5")
    )
    )


    Here is what I tested:
    ---------------------------------

    (setenv "CmdVisLines" "3")
    "3"

    Command: (getenv "CmdVisLines")
    "3"

    Command: (if (<= (atoi (getenv "CmdVisLines")) 4)
    (_> (progn
    ((_> (setenv "CmdVisLines" "5")
    ((_> )
    (_> )
    "5"

    Command: (getenv "CmdVisLines")
    "5"

    Command: (setenv "CmdVisLines" "12")
    "12"

    Command: (if (<= (atoi (getenv "CmdVisLines")) 4)
    (_> (progn
    ((_> (setenv "CmdVisLines" "5")
    ((_> )
    (_> )
    nil

    Command: (getenv "CmdVisLines")
    "12"


    bobb
     
    Bob Basques, Aug 23, 2003
    #4
  5. sashk

    Mark Propst Guest

    nice catch!
    :)
     
    Mark Propst, Aug 23, 2003
    #5
  6. For what it is worth, do not expect CmdVisLines or the
    equivalent ativex methods to work in AutoCAD 2004.
     
    Jason Piercey, Aug 23, 2003
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.