Using Extended AutoLISP Functions

AutoCAD AutoLISP & Visual LISP

 
Using Extended AutoLISP Functions
 
 
 

VLISP provides some extensions to the AutoLISP language that are not loaded automatically when you start AutoCAD. These functions have names that begin with vla-, vlax-, and vlr. The vla- functions implement ActiveX® support in AutoLISP (described in Working with ActiveX). The vlax- functions provide ActiveX utility and data conversion functions, dictionary handling functions, and curve measurement functions. The vlr- functions provide support for AutoCAD reactors. Before you can use any of these functions, you need to load the AutoLISP extensions with the following function call:

      (vl-load-com)
    

This function first checks whether or not the AutoLISP extensions are already loaded. If the AutoLISP extensions are loaded, function does nothing; otherwise it loads the extensions.

If you're using the VLISP interactive development environment to develop code, chances are you'll want to use the AutoLISP extensions at some point. It's a good practice to issue vl-load-com when you start VLISP, or to include a call to the function in your acaddoc.lsp file, so that it loads automatically. But if you write programs that use any of the extended AutoLISP functions, you need to call vl-load-com in those programs to ensure that the functions are available to other users running your code.