Jump to content

Recommended Posts

Posted

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

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • BlackBox

    10

  • Ahankhah

    5

  • alanjt

    3

  • troggarf

    3

Posted
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. :D

Posted
Three points for usage of atoms-family. :D

lol............

Posted

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.

  • 2 years later...
Posted

So how system variable function is correctly writen? Lets say pdmode

Posted

I believe system variables are already protected.

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