AutoCAD: Secrets Every User Should Know

Annotation

Earlier in this chapter, I showed you how a semicolon can be used to add notes to an AutoLISP program. The more notes you add, the easier it will be for you and others to understand your programs later. But too much annotation can make your code harder to read. Find a nice balance.

Annotation should include header material identifying the name of the program, when it was written, who wrote it, what it does, and any limitations you want to put on its use. You (or your employer) own the copyright on any program you write, and so do other people who write code. That s why you shouldn t use programs without permission. I advise you to take a leaf from Autodesk s book. At the beginning of the file, add a line giving people permission to use your program as-is. If you don t want anyone to use your programs, indicate that in the file, and don t pass them around. If you want to protect the code itself from being used by others to write their own program, compile it so it can t be edited. Check the Visual LISP editor Help system to see how.

When you write a program as a subcontractor, make sure all parties agree about who owns the final produce. I retain ownership of my programs, but I give permission for them to be used without express or implied warranty. Why no warranty? Once you hand over a program, you can t anticipate every...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Robot Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.