au-s Posted November 21, 2008 Posted November 21, 2008 Hello, Im new to lisp and trying to make a lisp that frezzes nd changes colour on some xref-layers. This is the code, of course not working ... do I miss something out? (defun c:kflager () (setq xref_klager (*|K*)) (setq xref_fklager (4K*|K005,4K*|K301-0)) (command ".layer" "C" 151 "xref_klager" "" "") (command ".layer" "F" "xref_fklager" "" "") (princ) ) (princ) Thanx in advance! best regards /Artur:) Quote
lpseifert Posted November 21, 2008 Posted November 21, 2008 You can't make a variable of the layers as you have tried try this (defun c:kflager () (command ".layer" "c" "151" "*|K*" "") (command ".layer" "f" "4k*|K005,4K*|K301-0" "") (princ) ) Quote
au-s Posted November 21, 2008 Author Posted November 21, 2008 Ok thanx ... If I recall right I think I previously some month ago managed to do it with setq... If I find it I will post it here.. Thanx Quote
CAB Posted November 21, 2008 Posted November 21, 2008 You were close. (defun c:kflager (/ xref_klager xref_fklager) (setq xref_klager "*|K*") (setq xref_fklager "4K*|K005,4K*|K301-0") (command ".layer" "C" 151 xref_klager "" "") (command ".layer" "F" xref_fklager "" "") (princ) ) (princ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.