Skip To Content

Customization with AutoLISP

AutoLISP is a powerful user customization scripting language. Autodesk AutoCAD has a built-in LISP interpreter. You can type AutoLISP code at the command prompt or load code from external (.lsp) files. There are numerous ways to load and invoke AutoLISP from scripts, menus, and other application programming interfaces (API). Esri has created a collection of AutoLISP functions included with ArcGIS for AutoCAD to work with coordinate systems, feature attributes, field definitions, labels, web feature layers, map layers, and map imagery layers and their subtypes. It is assumed that users of this AutoLISP API have a basic understanding of AutoLISP and how it is used in AutoCAD. The functions are standard AutoLISP tools that work in conjunction with other AutoLISP routines in AutoCAD as well.

There are a number of ArcGIS for AutoCAD-specific commands in addition to the AutoLISP commands that work with GIS features and interact with ArcGIS for AutoCAD user interface behavior. You can include the ArcGIS for AutoCAD commands in your customization integrated with the mix of ArcGIS for AutoCAD AutoLISP functions and AutoLISP functions and commands available to you in Autodesk AutoCAD. ArcGIS for AutoCAD commands prefaced with a "-" character are designed to work from the command line without a graphic user interface and are readily useable in AutoLISP.

The provided AutoLISP function controls the ArcGIS for AutoCAD objects and allow you to get a list of existing objects, add new objects, remove objects, and set the properties of objects.