Hello all.
I want to protect a lisp file with suffix .lsp.
How can I do it.
Thanks for suggestion.
|
Hello all.
I want to protect a lisp file with suffix .lsp.
How can I do it.
Thanks for suggestion.
If maintaining the .LSP file extension is a requirement, then grab protect.exe. It will "compile" a .lsp file, leaving the file extension the same. Note that unprotect.exe is readily available also.
If you really just want to compile it (in a much more protected manner) and the file extension is not important, then compile the LSP file to FAS using the (vlisp-compile) function. -or- compile the a .VLX file using the Make Application tools in the VLIDE. (details on how to do both are available in HELP)
R.K. McSwain | CAD Panacea |
Well it's not often tht I can assist with anything though here goes.
I was wanting the exact same thing and decided to try write a routine that would convert the files to a ".fas" file for me. My attempt is below:
Code:(defun c:FAS (/ name lispname outfilename findfas rewritefas) (setvar "cmdecho" 0) (setq name (strcase (getstring "Enter Lisp Name: "))) (setq lispname (strcat "S:\\DSA CAD\\Lisp for AutoCad\\Used LISp Files\\" name ".LSP" ) ;_end strcat ) ;_end setq (setq outfilename (strcat "S:\\DSA CAD\\Lisp for AutoCad\\Used LISp Files\\FAS Files\\" name ".FAS" ) ;_end strcat ) ;_end setq (setq findfas (findfile outfilename)) (if (not findfas) (vlisp-compile 'st lispname outfilename) (progn (initget "Y N") (setq rewritefas (getkword "Save Over Existing FAS? [Yes or No]: ") ) ;_end setq (if (= rewritefas "Y") (vlisp-compile 'st lispname outfilename) (alert "FAS Compiling Aborted") ) ;_end if ) ;_end progn ) ;_end if (setvar "cmdecho" 1) (princ) ) ;_end defun
So just save the file and load the routine. Type "FAS" and then just the lisp file name without the extension.
Oh that reminds me, change the folder locations for the variables lispname & outfilename to your own directory paths.
Stephen
Last edited by Opie; 2007-08-13 at 04:53 PM. Reason: [CODE] tags added
Thanks for the answer.Originally Posted by rkmcswain
This file work in DOS Mode but function.
Hi I try to do your sample, bat I get an error:
; error: no function definition: VLISP-COMPILE
Do you know why?
Thanks...
R.K. McSwain | CAD Panacea |
Thanks,
I try to run both:
(vl-load-com) first
and then de function (VLISP-COMPILE), bat the error is the same.
Im wait.
Thanks...
--------------------------------------------------
Command: (vl-load-com)
Command: FAS
Enter Lisp Name: IGUALQUE
; error: no function definition: VLISP-COMPILE
Command:
--------------------------------------------------
What's wrong?, my program?, i don't know.
Thanks...
What does AutoCad return when you paste this into the commandline:What version of acad are you running?Code:(member "vl.arx" (arx))