Whats Wrong with this......

sashk

Usenet Archive
Joined
Jul 14, 2003
Messages
69
Reaction score
0
(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
 
why not just use this?
(< (getenv "CmdVisLines") "5")
 
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
 
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
 
For what it is worth, do not expect CmdVisLines or the
equivalent ativex methods to work in AutoCAD 2004.
 

Latest threads

Back
Top