Simple LISP question...

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
Reply to
jimb
Loading thread data ...
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 :
> 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 >
Reply to
Michel
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...
Reply to
JP
thanks
both ways work.
jimB -------------------------------------------- JimB -------------------------------------------- my SPAM defense: Replace all the X's in email address with M
Reply to
jimb
(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
Reply to
jimb

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.