Thursday
Visual LISPProtecting your AutoLISP codes
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.
Viewed 6,017 times so far... This week: 49 Today: 2 Latest: 5 July 2009, 4:55Post Tags: AutoLISP, Programming
Related Posts
Popular
- Hip tip: Increasing view resolution with VIEWRES system variable
07/03/2009 04:39 am
7 Comments - Sirince – IZMIR
07/02/2009 11:02 am
1 Comment - Visual LISP: Programming user interfaces with OpenDCL
07/01/2009 10:15 pm
10 Comments - 3D Modeling 7: EXTRUDE
06/30/2009 02:14 pm
10 Comments - Ask DailyAutoCAD: Which Notebook to Buy?
06/30/2009 12:17 pm
1 Comment
Featured Articles
- AutoCAD 2009 Update 3 Released
- Speed Up As AutoCAD 2009 Ribbon Menu Helps You!
- MEP Analysis Extension for AutoCAD MEP extended to March 31, 2009
- Recap of AutoCAD-related technologies on Autodesk Labs
- Technology Preview of MEP Analysis Extension extended to 12/31/08
- Autodesk Labs: Forward and Backward utility for AutoCAD
|

Nov 9, 2007
Reply
hello…
your web site help me alot.
thaks.
from
Dilshad(Pakistan)
Jan 17, 2008
Reply
Code protection is great. Out lspname.fas is good for distribution.
Feb 28, 2008
Reply
Thanks
Your information will help me a lot.
Mar 11, 2008
Reply
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!
Mar 11, 2008
Reply
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.
Oct 21, 2008
Reply
thanks。rate 5 star
Feb 8, 2009
Reply
Hello Sir,
If it is possible, give an explanation how to Rebuilt fas compile to original lsp format. ie. Readable format. Thanks in advance.
Apr 24, 2009
Reply
Hello Sir,
Some autolisp file is not run in autocad, why?
May 20, 2009
Reply
Dear Sir,
i need a pgm that
1. prompts for Radius of circle
2. when Radius is given, all the cirlces of similar diameter ( tolerance of +/- .05 ,
precision two decimal places) in the dwg should be grip selected
3. so that i can change the selected (Grip highlited) circles to different layer with
layer name being their diameter.
i had almost done, except that, each time i have to alter the radius value in the code,
below is the code
(defun c:SIMRAD ()
(setq rad (cdr (assoc 40 (entget (car (entsel))))))
(alert (strcat “Radius = ” (rtos rad 2)))
(princ)
(cadr(sssetfirst nil(setq ss_grip (ssget “_X”‘((0 . “CIRCLE”)(-4 . “=”)(40 . 4.0
))))))
)
can somebody suggest a solution