alanjt Posted November 28, 2011 Posted November 28, 2011 Here's a generic one I did a while back, but never ended up using or thoroughly testing... (defun _protectLoad (directory / before after) (if (setq directory (findfile directory)) (progn (setq before (cons 'before (atoms-family 0))) (foreach file (vl-directory-files directory "*.LSP" 1) (load (strcat directory "\\" file) nil) ) (if (setq after (vl-remove-if '(lambda (x) (member x before)) (atoms-family 0))) (progn (eval (list 'pragma (list 'quote (list (cons 'unprotect-assign after))))) (eval (list 'pragma (list 'quote (list (cons 'protect-assign after))))) ) ) ) ) ) Quote
BlackBox Posted November 28, 2011 Author Posted November 28, 2011 Here's a generic one I did a while back, but never ended up using or thoroughly testing... Three points for usage of atoms-family. Quote
alanjt Posted November 28, 2011 Posted November 28, 2011 Three points for usage of atoms-family. lol............ Quote
Ahankhah Posted November 29, 2011 Posted November 29, 2011 I find out that: 1- PRAGMA does't work (at least in changing protected symbols to blue), if VLIDE editor isn't active (i.e. open). 2- Here are two other key-words other than protect-assign and unprotect-assign, used by PRAGMA function: export-to-acad not-localize I am studying to know what is the effect of using two above symbols by PRAGMA. Quote
samifox Posted May 12, 2014 Posted May 12, 2014 So how system variable function is correctly writen? Lets say pdmode Quote
Bhull1985 Posted May 12, 2014 Posted May 12, 2014 I believe system variables are already protected. 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.