Simple LISP question...

Sep 22, 2003 4 Replies

Good day,



I would like to know why this works in R14 and not 2000.



(DEFUN C:TL () (IF (="SS" (GETVAR "CLAYER")) (COMMAND "LAYER" "T" "CS" "S" "CS" "F" "SS" "") (IF (="CS"(GETVAR "CLAYER")) (COMMAND "LAYER" "T" "SS" "S" "SS" "F" "CS" "")))(PRINC))



TIA



jim



-------------------------------------------- JimB



-------------------------------------------- my SPAM defense: Replace all the X's in email address with M


2 things....

1- write "-layer" , not "layer"

2- now layer names are case sensitive....so the if conditions should look like this:

(IF (="SS" (strcase (GETVAR "CLAYER")))

jimb a écrit :

Try using this: (DEFUN C:TL () (IF (="SS" (GETVAR "CLAYER")) ;check for current layer (COMMAND "LAYER" "T" "CS" "S" "CS" "F" "SS" "") ;ss active, set CS (COMMAND "LAYER" "T" "SS" "S" "SS" "F" "CS" "") ) ;cs active, set SS (PRINC) ); end defun

Works on my PC perfectly.

Jan

"jimb" schreef in bericht news: snipped-for-privacy@news.inr.net...

thanks

both ways work.

jimB

-------------------------------------------- JimB

-------------------------------------------- my SPAM defense: Replace all the X's in email address with M

(DEFUN C:TL () (IF (="SS" (GETVAR "CLAYER")) ;check for current layer (COMMAND "LAYER" "T" "CS" "S" "CS" "F" "SS" "") ;ss active, set CS (COMMAND "LAYER" "T" "SS" "S" "SS" "F" "CS" "") ) ;cs active, set SS (PRINC) thanks

both ways work

jimB

-------------------------------------------- JimB

-------------------------------------------- my SPAM defense: Replace all the X's in email address with M

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required