Protecting your AutoLISP codes
Print This Post
![]() |
Author | Orhan Toker |
| Profession | Architect M.Sc. | |
| Autodesk Authorized Consultant | ||
| Database Specialist | ||
If you are writing VisualLISP codes professionally, then you should prevent people to read your codes. Thanks to VisualLISP, there is a way of doing this. You do not have to buy a separate program like Microsoft Visual Studio .NET.
Now, let’s have a look at how to convert a single LISP file into a FAS (protected code) file. For example, let’s assume that we have a file in our hand named as HEAL.LSP. You cannot directly make this file with FAS extension. First, you have to put your AutoLISP file into a project.
Those who are familiar with programming know very well that a project is a combination of all of the files like codes, libraries and interface files that are related to the subject. By this way, the compiler keeps all of the files together in one place.
After giving some brief information about project, now let’s have a look at how to create a new project in VisualLISP editor. You can easily do this from “Project/New Project…” menu. Fig.1

Fig.1
You will come up with standard “file open/save” dialog box. You can create and give your project any name that you want (I named it as “sample“). After this you will come up against a dialog box.

Fig.2
In this dialog box, you can select the files that you would like to add to your project. In this example, our project is made up of one single AutoLISP file only. If the file is already inside the directory where you saved your project, then it will automatically be seen. Our LISP file was HEAL.LSP. Select this file and send it yo right side.

Fig.3
As soon as you create the project, “Project Explorer” window will appear on your screen. In this window, you can see a list of codes that are used in you project and a small toolbar. What we are interested is that when you double-click on the code, the code is opened and “Build Project FAS” options. I will explain about the other options when I prepare another article about project.
You can encrypt your project by using “Build Project FAS” option. VisualLISP will create a file named as HEAL.FAS. Code of this file will not be able to be read. However, you will be able to load it as a LSP file and use it.
Similar Posts
Rate this article:


November 9th, 2007 20:15
hello…
your web site help me alot.
thaks.
from
Dilshad(Pakistan)
January 17th, 2008 09:15
Code protection is great. Out lspname.fas is good for distribution.
February 28th, 2008 18:28
Thanks
Your information will help me a lot.
March 11th, 2008 05:50
hi tohar!
your tutorial very useful!then i need one help with you!can give some maodel projects!now i know bit of alisp programs!how i can utilize this one!so planed to do some small projects!if u have some modal project can send me through my mail!
March 11th, 2008 08:58
Hello Krish,
please take a look at our download page. I think you can find a lot of lisp samples. Also check out AutoLISp page.