Jump to content

Recommended Posts

Posted

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:)

Posted

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)
)

Posted

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

Posted

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)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...